FreeBSD/src b8bc9ab (r332486)sys/netpfil/pf pf_ioctl.c

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.
DeltaFile
+14-8sys/netpfil/pf/pf_ioctl.c
+14-81 files

UnifiedSplitRaw