Description
In the Linux kernel, the following vulnerability has been resolved:

netfilter: nfnetlink_osf: fix out-of-bounds read on option matching

In nf_osf_match(), the nf_osf_hdr_ctx structure is initialized once
and passed by reference to nf_osf_match_one() for each fingerprint
checked. During TCP option parsing, nf_osf_match_one() advances the
shared ctx->optp pointer.

If a fingerprint perfectly matches, the function returns early without
restoring ctx->optp to its initial state. If the user has configured
NF_OSF_LOGLEVEL_ALL, the loop continues to the next fingerprint.
However, because ctx->optp was not restored, the next call to
nf_osf_match_one() starts parsing from the end of the options buffer.
This causes subsequent matches to read garbage data and fail
immediately, making it impossible to log more than one match or logging
incorrect matches.

Instead of using a shared ctx->optp pointer, pass the context as a
constant pointer and use a local pointer (optp) for TCP option
traversal. This makes nf_osf_match_one() strictly stateless from the
caller's perspective, ensuring every fingerprint check starts at the
correct option offset.
Published: 2026-06-24
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability originates from nf_osf_match(), where the shared context pointer is not restored after a successful fingerprint match. When NF_OSF_LOGLEVEL_ALL is enabled, the function reuses the advanced pointer for subsequent matches, causing it to read beyond the bounds of the TCP option buffer. This out‑of‑bounds read corrupts log data and can trigger a kernel abort, resulting in service disruption or incorrect log entries. The weakness is a classic out‑of‑bounds read flaw, marked by CWE‑125.

Affected Systems

This flaw affects the Linux kernel in all distributions, as the advisory references the generic CPE for Linux kernel and does not specifymodule. Any kernel build that includes the nfnetlink_osf component is potentially vulnerable, regardless of version.

Risk and Exploitability

The advisory does not provide a CVSS score or EPSS estimate, and the vulnerability is not listed in the CISA KEV catalog. The bug requires that the attacker is able to configure NF_OSF_LOGLEVEL_ALL, which typically requires local or root privileges. While there are no publicly disclosed exploits, the nature of the out‑of‑bounds privileged adversary to corrupt logs or cause a kernel panic, representing a moderate to high risk for systems that enable detailed OSF logging.

Generated by OpenCVE AI on June 24, 2026 at 18:38 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Linux kernel to a release that includes the commit that restores ctx->optp after each match
  • If the system must use nfnetlink_osf, disable NF_OSF_LOGLEVEL_ALL or restrict its use to non‑privileged contexts
  • Monitor kernel logs for irregular entries and consider disabling or auditing nfnetlink_osf activity

Generated by OpenCVE AI on June 24, 2026 at 18:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 24 Jun 2026 19:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-125

Wed, 24 Jun 2026 17:15:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: netfilter: nfnetlink_osf: fix out-of-bounds read on option matching In nf_osf_match(), the nf_osf_hdr_ctx structure is initialized once and passed by reference to nf_osf_match_one() for each fingerprint checked. During TCP option parsing, nf_osf_match_one() advances the shared ctx->optp pointer. If a fingerprint perfectly matches, the function returns early without restoring ctx->optp to its initial state. If the user has configured NF_OSF_LOGLEVEL_ALL, the loop continues to the next fingerprint. However, because ctx->optp was not restored, the next call to nf_osf_match_one() starts parsing from the end of the options buffer. This causes subsequent matches to read garbage data and fail immediately, making it impossible to log more than one match or logging incorrect matches. Instead of using a shared ctx->optp pointer, pass the context as a constant pointer and use a local pointer (optp) for TCP option traversal. This makes nf_osf_match_one() strictly stateless from the caller's perspective, ensuring every fingerprint check starts at the correct option offset.
Title netfilter: nfnetlink_osf: fix out-of-bounds read on option matching
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-06-24T16:29:11.757Z

Reserved: 2026-06-09T07:44:35.377Z

Link: CVE-2026-52999

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-24T18:45:05Z

Weaknesses