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)
Thu, May 29, 4:03 AM
Unknown Object (File)
Thu, May 22, 4:11 PM
Unknown Object (File)
Wed, May 21, 2:40 PM
Unknown Object (File)
Tue, May 20, 4:12 AM
Unknown Object (File)
Mon, May 19, 8:05 PM
Unknown Object (File)
Sun, May 18, 2:20 AM
Unknown Object (File)
Apr 25 2025, 2:07 PM
Unknown Object (File)
Apr 25 2025, 2:01 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