Page MenuHomeFreeBSD

pf: fix another endpoint-independent crash
ClosedPublic

Authored by kp on Nov 21 2025, 1:24 PM.
Tags
None
Referenced Files
F163004084: D53856.diff
Sun, Jul 19, 2:34 AM
F162999869: D53856.id166889.diff
Sun, Jul 19, 1:37 AM
F162995079: D53856.diff
Sun, Jul 19, 12:32 AM
Unknown Object (File)
Wed, Jul 15, 6:56 AM
Unknown Object (File)
Wed, Jul 15, 6:56 AM
Unknown Object (File)
Tue, Jun 23, 4:35 PM
Unknown Object (File)
Mon, Jun 22, 5:14 AM
Unknown Object (File)
May 25 2026, 10:10 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