]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r332101:
authorkp <kp@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 13 Apr 2018 19:23:06 +0000 (19:23 +0000)
committerkp <kp@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 13 Apr 2018 19:23:06 +0000 (19:23 +0000)
commitf7059e82edb5bd10e8c4b16091e5c2efcd865951
tree29e301a820d844f24e100c0e2e249c0a78a31d71
parent150d40d99b54d731ff7bcaf6ee542c14a1228174
MFC r332101:

pf: Improve ioctl validation for DIOCRADDTABLES and DIOCRDELTABLES

The DIOCRADDTABLES and DIOCRDELTABLES ioctls can process a number of
tables at a time, and as such try to allocate <number of tables> *
sizeof(struct pfr_table). This multiplication can overflow. Thanks to
mallocarray() this is not exploitable, but an overflow does panic the
system.

Arbitrarily limit this to 65535 tables. pfctl only ever processes one
table at a time, so it presents no issues there.

git-svn-id: svn://svn.freebsd.org/base/stable/10@332487 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netpfil/pf/pf_ioctl.c