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)
Sat, Mar 22, 8:15 AM
Unknown Object (File)
Sat, Mar 15, 7:30 PM
Unknown Object (File)
Thu, Mar 13, 7:00 PM
Unknown Object (File)
Wed, Mar 12, 10:52 PM
Unknown Object (File)
Feb 24 2025, 9:33 AM
Unknown Object (File)
Feb 22 2025, 4:37 AM
Unknown Object (File)
Feb 21 2025, 7:36 PM
Unknown Object (File)
Feb 2 2025, 6:55 PM

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable