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)
Sun, Feb 2, 6:55 PM
Unknown Object (File)
Fri, Jan 31, 5:56 PM
Unknown Object (File)
Jan 12 2025, 1:44 PM
Unknown Object (File)
Jan 12 2025, 1:40 PM
Unknown Object (File)
Jan 12 2025, 11:08 AM
Unknown Object (File)
Dec 28 2024, 8:18 AM
Unknown Object (File)
Dec 12 2024, 10:12 AM
Unknown Object (File)
Dec 5 2024, 1:37 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