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)
Sat, Feb 1, 9:56 PM
Unknown Object (File)
Mon, Jan 27, 5:01 PM
Unknown Object (File)
Mon, Jan 27, 4:33 PM
Unknown Object (File)
Sun, Jan 26, 9:19 PM
Unknown Object (File)
Jan 11 2025, 1:00 AM
Unknown Object (File)
Jan 10 2025, 10:39 PM
Unknown Object (File)
Nov 28 2024, 6:18 PM
Unknown Object (File)
Nov 24 2024, 6:28 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