HomeFreeBSD

pf: handle multiple IPv6 fragment headers

Description

pf: handle multiple IPv6 fragment headers

With 'scrub fragment reassemble' if a packet contains multiple IPv6
fragment headers we would reassemble the packet and immediately
continue processing it.

That is, we'd remove the first fragment header and expect the next
header to be a final header (i.e. TCP, UDP, ICMPv6, ...). However, if
it's another fragment header we'd not treat the packet correctly.
That is, we'd fail to recognise the payload and treat it as if it were
an IPv6 fragment rather than as its actual payload.

Fix this by restarting the normalisation on the reassembled packet.
If there are multiple fragment headers drop the packet.

Reported by: Enrico Bassetti bassetti@di.uniroma1.it (NetSecurityLab @ Sapienza University of Rome)
Approved by: so
Security: FreeBSD-SA-23:10.pf
Security: CVE-2023-4809
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 76afcbb52492f9b3e72ee7d4c4ed0a54c25e1c48)
(cherry picked from commit 8922b9ac0b48749be42689ea959e6a1664f96b12)

Details

Provenance
kpAuthored on Jul 28 2023, 9:39 AM
gordonCommitted on Sep 6 2023, 5:19 PM
Parents
rG595be1fc5798: Add UPDATING entries and bump version
Branches
Unknown
Tags
Unknown