Page MenuHomeFreeBSD

Merge r284222, r284260
ClosedPublic

Authored by kp on Jun 15 2015, 10:30 AM.
Tags
None
Referenced Files
F105132888: D2824.id6207.diff
Thu, Dec 12, 5:45 PM
Unknown Object (File)
Sep 23 2024, 9:12 AM
Unknown Object (File)
Sep 23 2024, 9:12 AM
Unknown Object (File)
Sep 23 2024, 9:12 AM
Unknown Object (File)
Sep 23 2024, 9:02 AM
Unknown Object (File)
Sep 19 2024, 8:57 PM
Unknown Object (File)
Sep 19 2024, 2:44 PM
Unknown Object (File)
Sep 18 2024, 2:20 PM
Subscribers

Details

Summary

pf: address family must be set when creating a pf_fragment

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).

When we try to look up a pf_fragment with pf_find_fragment() we compare (see
pf_frag_compare()) addresses (and family), but also protocol. We failed to
save the protocol to the pf_fragment in pf_fragcache(), resulting in failing
reassembly.

PR: 200330

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kp retitled this revision from to Merge r284222, r284260.
kp updated this object.
kp edited the test plan for this revision. (Show Details)
kp added reviewers: gnn, philip.
kp set the repository for this revision to rS FreeBSD src repository - subversion.
gnn edited edge metadata.
This revision is now accepted and ready to land.Jun 16 2015, 12:54 PM
This revision was automatically updated to reflect the committed changes.