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)
Mon, Oct 12, 4:55 PM
Unknown Object (File)
Wed, Sep 23, 2:50 AM
Unknown Object (File)
Mon, Sep 14, 2:53 AM
Unknown Object (File)
Sep 13 2026, 6:44 PM
Unknown Object (File)
Sep 10 2026, 1:50 AM
Unknown Object (File)
Sep 6 2026, 1:11 AM
Unknown Object (File)
Sep 3 2026, 10:05 PM
Unknown Object (File)
Aug 28 2026, 12:45 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 54130
Build 51020: arc lint + arc unit