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)
Thu, Nov 20, 5:51 PM
Unknown Object (File)
Nov 11 2025, 12:33 AM
Unknown Object (File)
Oct 25 2025, 3:48 PM
Unknown Object (File)
Oct 25 2025, 3:48 PM
Unknown Object (File)
Oct 25 2025, 9:13 AM
Unknown Object (File)
Oct 16 2025, 2:02 AM
Unknown Object (File)
Oct 14 2025, 12:47 AM
Unknown Object (File)
Sep 25 2025, 4:30 AM
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.