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)
Oct 2 2024, 10:12 PM
Unknown Object (File)
Oct 2 2024, 5:23 PM
Unknown Object (File)
Oct 2 2024, 1:52 AM
Unknown Object (File)
Sep 21 2024, 4:35 AM
Unknown Object (File)
Sep 21 2024, 4:34 AM
Unknown Object (File)
Sep 21 2024, 4:34 AM
Unknown Object (File)
Sep 21 2024, 4:24 AM
Unknown Object (File)
Sep 5 2024, 9:20 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