Page MenuHomeFreeBSD

pf: fix handling unreassembled fragments
ClosedPublic

Authored by kp on Aug 4 2025, 3:40 PM.
Tags
None
Referenced Files
F130169860: D51722.diff
Sat, Sep 27, 4:24 AM
F130169726: D51722.diff
Sat, Sep 27, 4:22 AM
Unknown Object (File)
Wed, Sep 24, 2:57 AM
Unknown Object (File)
Sat, Sep 20, 9:26 PM
Unknown Object (File)
Sat, Sep 20, 3:26 AM
Unknown Object (File)
Fri, Sep 19, 12:34 PM
Unknown Object (File)
Thu, Sep 18, 7:54 PM
Unknown Object (File)
Tue, Sep 16, 5:05 PM

Details

Summary

If we handle a fragment and are configured not to reassemble it the
pd->proto field will show the layer 4 protocol (i.e. UDP,TCP,SCTP,...) but
pd->virtual_proto will show we're a fragment.
In that case we also don't have the layer 4 checksum pointer. Have code that
cares about L4 (e.g. NAT) check virtual_proto so it doesn't try to dereference a
NULL pcksum field.

PR: 288549
Reported by: Danilo Egea Gondolfo <danilo@FreeBSD.org>
Sponsored by: Rubicon Communications, LLC ("Netgate")
If we receive a fragmented packet and we're not reassembling it we don't have

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 65946
Build 62829: arc lint + arc unit

Event Timeline

kp requested review of this revision.Aug 4 2025, 3:40 PM
This revision was not accepted when it landed; it landed in state Needs Review.Aug 5 2025, 10:28 PM
This revision was automatically updated to reflect the committed changes.