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
F170616661: D30046.id88419.diff
Sat, Sep 5, 4:07 PM
F170553494: D30046.diff
Sat, Sep 5, 9:25 AM
F170487834: D30046.id88507.diff
Sat, Sep 5, 1:41 AM
F170464816: D30046.id.diff
Fri, Sep 4, 11:06 PM
F170430917: D30046.id88507.diff
Fri, Sep 4, 7:22 PM
Unknown Object (File)
Thu, Sep 3, 7:07 PM
Unknown Object (File)
Thu, Sep 3, 7:16 AM
Unknown Object (File)
Thu, Sep 3, 5:56 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