Page MenuHomeFreeBSD

pf: address family must be set when creating a pf_fragment
ClosedPublic

Authored by kp on Jun 9 2015, 5:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 11, 7:34 PM
Unknown Object (File)
Sun, Oct 11, 7:26 PM
Unknown Object (File)
Wed, Oct 7, 3:42 AM
Unknown Object (File)
Tue, Oct 6, 11:52 PM
Unknown Object (File)
Sun, Sep 27, 6:34 PM
Unknown Object (File)
Sep 19 2026, 5:58 PM
Unknown Object (File)
Sep 11 2026, 5:21 PM
Unknown Object (File)
Sep 8 2026, 1:44 PM
Subscribers

Details

Reviewers
philip
gnn
Summary

Fix a panic when handling fragmented ip4 packets with 'drop-ovl' set.
In that scenario we take a different branch in pf_normalize_ip(), taking us to pf_fragcache() (rather than pf_reassemble()). In pf_fragcache() we create a pf_fragment, but do not set the address family. This leads to a panic when we try to insert that into pf_frag_tree because pf_addr_cmp(), which is used to compare the pf_fragments doesn't know what to do if the address family is not set.

Simply ensure that the address family is set correctly (always AF_INET in this path).

PR: 200330

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kp retitled this revision from to pf: address family must be set when creating a pf_fragment.
kp updated this object.
kp edited the test plan for this revision. (Show Details)
kp added reviewers: philip, gnn.
kp set the repository for this revision to rS FreeBSD src repository - subversion.
philip edited edge metadata.

Approved by: philip (mentor)

This revision is now accepted and ready to land.Jun 9 2015, 5:12 PM
gnn edited edge metadata.

Submitted as r284222.