CVE Vulnerabilities

CVE-2023-4809

Improper Handling of Additional Special Element

Published: Sep 06, 2023 | Modified: Nov 21, 2024
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
CVSS 2.x
RedHat/V2
RedHat/V3
Ubuntu

In pf packet processing with a scrub fragment reassemble rule, a packet containing multiple IPv6 fragment headers would be reassembled, and then immediately processed. That is, a packet with multiple fragment extension headers would not be recognized as the correct ultimate payload. Instead a packet with multiple IPv6 fragment headers would unexpectedly be interpreted as a fragmented packet, rather than as whatever the real payload is.

As a result, IPv6 fragments may bypass pf firewall rules written on the assumption all fragments have been reassembled and, as a result, be forwarded or processed by the host.

Weakness

The product receives input from an upstream component, but it does not handle or incorrectly handles when an additional unexpected special element is provided.

Affected Software

Name Vendor Start Version End Version
Freebsd Freebsd * 12.4 (excluding)
Freebsd Freebsd 13.0 (including) 13.2 (excluding)
Freebsd Freebsd 12.4 (including) 12.4 (including)
Freebsd Freebsd 12.4-p1 (including) 12.4-p1 (including)
Freebsd Freebsd 12.4-p2 (including) 12.4-p2 (including)
Freebsd Freebsd 12.4-p3 (including) 12.4-p3 (including)
Freebsd Freebsd 12.4-p4 (including) 12.4-p4 (including)
Freebsd Freebsd 12.4-rc2-p1 (including) 12.4-rc2-p1 (including)
Freebsd Freebsd 12.4-rc2-p2 (including) 12.4-rc2-p2 (including)
Freebsd Freebsd 13.2 (including) 13.2 (including)
Freebsd Freebsd 13.2-p1 (including) 13.2-p1 (including)
Freebsd Freebsd 13.2-p2 (including) 13.2-p2 (including)

Potential Mitigations

  • Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

References