Page MenuHomeFreeBSD

libpfctl: fix pfctl_do_ioctl()
ClosedPublic

Authored by kp on Oct 23 2023, 3:13 PM.
Tags
None
Referenced Files
F152112271: D42329.diff
Sun, Apr 12, 7:39 PM
F152029827: D42329.id129283.diff
Sun, Apr 12, 5:24 AM
F152029479: D42329.id129283.diff
Sun, Apr 12, 5:20 AM
Unknown Object (File)
Mon, Apr 6, 12:12 PM
Unknown Object (File)
Sun, Apr 5, 1:35 AM
Unknown Object (File)
Wed, Apr 1, 12:46 PM
Unknown Object (File)
Thu, Mar 26, 8:28 AM
Unknown Object (File)
Tue, Mar 24, 5:09 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