HomeFreeBSD

pf: Improve ioctl validation for DIOCIGETIFACES and DIOCXCOMMIT

Description

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.

MFC after: 1 week

Details

Provenance
kpAuthored on
Parents
rS332135: MFC r329859,r329860: Float protection in stand
Branches
Unknown
Tags
Unknown