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)
Fri, Nov 1, 3:53 AM
Unknown Object (File)
Oct 10 2024, 10:26 PM
Unknown Object (File)
Oct 1 2024, 9:36 PM
Unknown Object (File)
Sep 30 2024, 11:11 PM
Unknown Object (File)
Sep 18 2024, 6:10 PM
Unknown Object (File)
Sep 18 2024, 5:29 AM
Unknown Object (File)
Sep 17 2024, 7:33 PM
Unknown Object (File)
Sep 17 2024, 8:27 AM
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