Page MenuHomeFreeBSD

libpfctl: fix pfctl_do_ioctl()
ClosedPublic

Authored by kp on Oct 23 2023, 3:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 12, 9:05 AM
Unknown Object (File)
Thu, Mar 12, 9:01 AM
Unknown Object (File)
Sun, Mar 8, 7:03 PM
Unknown Object (File)
Sun, Mar 8, 7:03 PM
Unknown Object (File)
Wed, Mar 4, 1:04 AM
Unknown Object (File)
Sat, Feb 28, 5:48 AM
Unknown Object (File)
Fri, Feb 27, 1:29 AM
Unknown Object (File)
Tue, Feb 24, 7:13 PM
Subscribers

Details

Summary

pfctl_do_ioctl() copies the packed request data into the request buffer
and then frees it. However, it's possible for the buffer to be too small
for the reply, causing us to allocate a new buffer. We then copied from
the freed request, and freed it again.

Do not free the request buffer until we're all the way done.

PR: 274614
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable