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, Mar 31, 8:21 AM
Unknown Object (File)
Mar 12 2024, 12:30 AM
Unknown Object (File)
Mar 12 2024, 12:30 AM
Unknown Object (File)
Mar 8 2024, 4:16 AM
Unknown Object (File)
Mar 8 2024, 4:00 AM
Unknown Object (File)
Feb 21 2024, 5:48 AM
Unknown Object (File)
Feb 13 2024, 2:17 PM
Unknown Object (File)
Feb 8 2024, 9:04 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