VYPR
Unrated severityNVD Advisory· Published Sep 6, 2023· Updated Feb 13, 2025

pf incorrectly handles multiple IPv6 fragment headers

CVE-2023-4809

Description

CVE-2023-4809 allows attackers to bypass pf firewall rules in FreeBSD by sending crafted IPv6 packets with multiple fragment headers.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

CVE-2023-4809 allows attackers to bypass pf firewall rules in FreeBSD by sending crafted IPv6 packets with multiple fragment headers.

Vulnerability

In FreeBSD's pf packet filter, when a 'scrub fragment reassemble' rule is configured, a packet containing multiple IPv6 fragment headers would be reassembled and then immediately processed incorrectly. The pf code fails to recognize the packet's true payload, treating it as a fragmented packet instead of its actual content. This affects all supported versions of FreeBSD [1]. The bug has been present since 2013 when support for atomic fragments was added [2].

Exploitation

An attacker needs network access to send crafted IPv6 packets to a FreeBSD host or through a FreeBSD router running pf with 'scrub fragment reassemble' enabled. The attacker crafts a packet that appears as an IPv6 atomic fragment (with multiple fragment extension headers) [3]. After the packet is reassembled, it is processed against some firewall rules but then "corrected" and forwarded if no explicit deny rule is triggered [4]. No authentication or user interaction is required.

Impact

Successful exploitation allows IPv6 fragments to bypass firewall rules written on the assumption all fragments have been reassembled. The attacker's packet may be forwarded or processed by the host, potentially reaching internal network segments or services that should be protected [1]. This can lead to unauthorized information disclosure, bypass of access controls, or further network compromise.

Mitigation

FreeBSD has released patches for stable/13 (13.2-STABLE) and stable/12 (12.4-STABLE) on 2023-08-04, and for RELENG/13.2 (13.2-RELEASE-p3) and RELENG/12.4 (12.4-RELEASE-p5) on 2023-09-06 [1]. Users should update to the fixed versions immediately. OpenBSD pf is not affected by this bug [2]. There are no known workarounds; the only mitigation is applying the security update.

AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"The pf packet processing logic in FreeBSD does not correctly handle multiple IPv6 fragment headers, leading to a bypass of firewall rules."

Attack vector

An attacker can send a specially crafted IPv6 packet containing multiple fragment headers. When processed by a FreeBSD system with pf and IPv6 fragment reassembly enabled, these packets are not recognized as the ultimate payload. Instead, they are unexpectedly interpreted as fragmented packets, allowing them to bypass firewall rules that assume all fragments have been reassembled [ref_id=1]. This bypass enables the malicious fragments to be forwarded or processed by the host, potentially leading to unintended consequences.

Affected code

The vulnerability lies within the pf packet processing logic in FreeBSD, specifically concerning the reassembly of IPv6 fragments. The advisory notes that the relevant code in OpenBSD's pf, `pf_walk_header6()` in `pf.c`, contains sanity checks that are absent in FreeBSD's implementation [ref_id=1, ref_id=2].

What the fix does

The advisory indicates that OpenBSD's pf implementation, specifically the `pf_walk_header6()` function, includes sanity checks for IPv6 header chains that prevent this issue [ref_id=1, ref_id=2]. While no patch is provided for FreeBSD in the bundle, the recommended remediation is to adopt similar checks to ensure proper handling of multiple IPv6 fragment headers.

Preconditions

  • configThe firewall must be configured with pf.
  • configThe pf configuration must include a 'scrub fragment reassemble' rule for IPv6 traffic.

Generated on Jun 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.