CVE-2026-23397: nfnetlink_osf: validate individual option lengths in fingerprints

Published Mar 26, 2026
·
Updated

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

nfnetlinkosf: validate individual option lengths in fingerprints

nfnlosfaddcallback() validates optnum bounds and string NUL-termination but does not check individual option length fields. A zero-length option causes nfosfmatchone() to enter the option matching loop even when foptsize sums to zero, which matches packets with no TCP options where ctx->optp is NULL:

Oops: general protection fault KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] RIP: 0010:nfosfmatchone (net/netfilter/nfnetlinkosf.c:98) Call Trace: nfosfmatch (net/netfilter/nfnetlinkosf.c:227) xtosfmatchpacket (net/netfilter/xtosf.c:32) iptdotable (net/ipv4/netfilter/iptables.c:293) nfhookslow (net/netfilter/core.c:623) iplocaldeliver (net/ipv4/ipinput.c:262) iprcv (net/ipv4/ipinput.c:573)

Additionally, an MSS option (kind=2) with length < 4 causes out-of-bounds reads when nfosfmatchone() unconditionally accesses optp[2] and optp[3] for MSS value extraction. While RFC 9293 section 3.2 specifies that the MSS option is always exactly 4 bytes (Kind=2, Length=4), the check uses "< 4" rather than "!= 4" because lengths greater than 4 do not cause memory safety issues -- the buffer is guaranteed to be at least foptsize bytes by the ctx->optsize == foptsize check.

Reject fingerprints where any option has zero length, or where an MSS option has length less than 4, at add time rather than trusting these values in the packet matching hot path.

Affected Software

17 affected componentsFixes available
Linux Linux kernel (netfilter/nfnetlink_osf)
Microsoft azl3 kernel 6.6.126.1-1
Linux Linux kernel>=2.6.31.1<5.10.253
Linux Linux kernel>=5.11<5.15.203
Linux Linux kernel>=5.16<6.1.167
Linux Linux kernel>=6.2<6.6.130
Linux Linux kernel>=6.7<6.12.78
Linux Linux kernel>=6.13<6.18.20
Linux Linux kernel>=6.19<6.19.10
Linux Linux kernel=2.6.31
Linux Linux kernel=7.0-rc1
Linux Linux kernel=7.0-rc2
Linux Linux kernel=7.0-rc3
Linux Linux kernel=7.0-rc4
Linux Linux kernel=7.0-rc5
Linux Linux kernel=7.0-rc6
Linux Linux kernel=7.0-rc7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Update the kernel netfilter OSF fingerprint matching logic so it validates each individual option length in fingerprints: reject any fingerprint containing an option with zero length, and for the MSS option (kind=2) ensure its length is exactly 4 (reject lengths < 4). This prevents nf_osf_match_one from entering the option-parsing path with invalid lengths and avoids null-ptr dereference/out-of-bounds reads.

    nfnetlink_osf / nf_osf_match_one (net/netfilter/nfnetlink_osf.c) fingerprint option length validation = Reject fingerprints where any option has zero length, and where the MSS option (kind=2) has length less than 4

Event History

Mar 26, 2026
CVE Published
via MITRE·10:22 AM
Data Sourced
via MITRE·10:22 AM
Description
Data Sourced
via NVD·11:16 AM
RemedyDescriptionSeverityWeaknessAffected Software
Mar 27, 2026
Data Sourced
via Microsoft·08:03 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:03 AM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2026-23397?

CVE-2026-23397 has been classified with a medium severity level due to potential impact on system stability.

2

How do I fix CVE-2026-23397?

To fix CVE-2026-23397, you should update to the latest version of the Linux kernel that includes the security patch.

3

What does CVE-2026-23397 affect?

CVE-2026-23397 affects the nfnetlink_osf component of the Linux kernel specifically.

4

Can CVE-2026-23397 lead to system exploitation?

Yes, CVE-2026-23397 could potentially lead to exploitation through improper handling of option lengths in fingerprints.

5

Is there a workaround for CVE-2026-23397 before applying a patch?

Currently, there is no established workaround for CVE-2026-23397; applying the patch is the recommended solution.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203