Page MenuHomeFreeBSD

pf: fix another endpoint-independent crash
ClosedPublic

Authored by kp on Nov 21 2025, 1:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 10, 6:36 PM
Unknown Object (File)
Tue, Mar 10, 12:59 AM
Unknown Object (File)
Mon, Mar 9, 4:07 AM
Unknown Object (File)
Mon, Mar 2, 3:29 PM
Unknown Object (File)
Mon, Mar 2, 3:14 PM
Unknown Object (File)
Thu, Feb 12, 6:57 AM
Unknown Object (File)
Feb 3 2026, 12:46 AM
Unknown Object (File)
Jan 31 2026, 6:02 AM

Details

Summary

In c12013f5bb38 we fixed udp_mapping cleanup issues in pf_get_sport(), but
missed the static-port case (i.e. low == 0 && high == 0). We could still exit
pf_get_sport() without either inserting the udp_mapping or freeing it.

Address this and add a test case to provoke the problem.

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