Page MenuHomeFreeBSD

sbin/ipfw: Fix null pointer deference when printing counters
ClosedPublic

Authored by donner on Apr 30 2021, 2:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 12, 1:45 PM
Unknown Object (File)
Dec 14 2025, 6:24 AM
Unknown Object (File)
Dec 11 2025, 12:27 AM
Unknown Object (File)
Nov 28 2025, 10:29 AM
Unknown Object (File)
Nov 21 2025, 9:35 AM
Unknown Object (File)
Nov 10 2025, 2:56 PM
Unknown Object (File)
Nov 4 2025, 11:24 PM
Unknown Object (File)
Oct 27 2025, 3:15 AM

Details

Summary

ipfw -[tT] prints statistics of the last access. If the rule was never
used, the counter might be not exist. This happens unconditionally on
inserting a new rule. Avoid printing statistics in this case.

PR: 255491
Reported by: Haisheng Zhouz
MFC after: 1 week

Test Plan
# ipfw -t add allow tcp from any to any out

should not segfault.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 38933
Build 35822: arc lint + arc unit