]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r332136:
authorkp <kp@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 13 Apr 2018 21:19:06 +0000 (21:19 +0000)
committerkp <kp@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 13 Apr 2018 21:19:06 +0000 (21:19 +0000)
commite5038d9e613d29ee547428ef890b11482f988a41
tree0723dfa07129e5161b28a6d1017601604a3b656f
parentf7059e82edb5bd10e8c4b16091e5c2efcd865951
MFC r332136:

pf: Improve ioctl validation for DIOCIGETIFACES and DIOCXCOMMIT

These ioctls can process a number of items at a time, which puts us at
risk of overflow in mallocarray() and of impossibly large allocations
even if we don't overflow.

There's no obvious limit to the request size for these, so we limit the
requests to something which won't overflow. Change the memory allocation
to M_NOWAIT so excessive requests will fail rather than stall forever.

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