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)
Fri, Sep 18, 8:13 PM
Unknown Object (File)
Fri, Sep 18, 4:17 AM
Unknown Object (File)
Fri, Sep 11, 2:09 PM
Unknown Object (File)
Thu, Sep 10, 8:21 PM
Unknown Object (File)
Wed, Sep 9, 11:12 AM
Unknown Object (File)
Tue, Sep 8, 6:48 PM
Unknown Object (File)
Sat, Sep 5, 4:07 PM
Unknown Object (File)
Sat, Sep 5, 9:25 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable