Skip to main content
Vulnerability Database/CVE-2026-98576

CVE-2026-98576: Linux Kernel Buffer Overflow Vulnerability

CVE-2026-98576 is a buffer overflow flaw in the Linux kernel NFC LLCP subsystem that causes slab-out-of-bounds reads when logging service names. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98576 Overview

CVE-2026-98576 is a slab-out-of-bounds read in the Linux kernel's Near Field Communication (NFC) Logical Link Control Protocol (LLCP) subsystem. The functions nfc_llcp_wks_sap() and nfc_llcp_build_sdreq_tlv() pass non-null-terminated strings to pr_debug() using the %s format specifier. The string buffers originate from kmemdup() allocations or netlink attributes and lack guaranteed null termination. As a result, __dynamic_pr_debug() reads past the allocated slab region, which Kernel Address Sanitizer (KASAN) flags as an out-of-bounds read [CWE-125].

Critical Impact

An out-of-bounds read in kernel debug paths can disclose adjacent slab memory and cause instability when dynamic debug is enabled on affected systems.

Affected Products

  • Linux kernel NFC LLCP subsystem (upstream)
  • Distribution kernels shipping the unpatched net/nfc/llcp_commands.c and net/nfc/llcp_core.c code
  • Systems with NFC hardware or NFC netlink interface exposed to local users

Discovery Timeline

  • 2026-10-18 - CVE-2026-98576 published to the National Vulnerability Database
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98576

Vulnerability Analysis

The Linux kernel NFC LLCP code logs service access point (SAP) names and service discovery request (SDREQ) type-length-value (TLV) names through pr_debug(). Both call sites use the %s conversion specifier, which requires a null-terminated string. The underlying buffers do not meet that requirement because they are either duplicated with kmemdup() using the exact source length or supplied directly from netlink attribute payloads.

When dynamic debug is enabled for the NFC module, __dynamic_pr_debug() walks the buffer looking for a terminating null byte. The walk extends past the slab allocation boundary and reads unrelated kernel memory. KASAN detects this condition and reports a slab-out-of-bounds read in __dynamic_pr_debug.

Root Cause

The root cause is a mismatch between the expected contract of the %s printf conversion and the actual properties of the buffers handed to it. NFC service names are length-prefixed on the wire and are not required to carry a trailing null byte. Using %s without bounding the read length allows the formatter to traverse memory outside the allocation.

Attack Vector

Triggering the condition requires the ability to submit NFC LLCP service names through the kernel's NFC netlink interface or via an NFC peer, and dynamic debug must be enabled for the affected code paths. A local user with the required capabilities to open NFC netlink sockets can craft service name attributes without a terminating null byte and induce the out-of-bounds read in kernel debug output. The primary impact is information disclosure of adjacent slab memory and potential kernel instability.

The upstream fix replaces %s with %.*s and passes the explicit length of each service name buffer, bounding the formatter to the actual data length. The patch is distributed across multiple stable branches as referenced in the kernel git commits.

Detection Methods for CVE-2026-98576

Indicators of Compromise

  • KASAN report entries referencing slab-out-of-bounds Read in __dynamic_pr_debug with call stacks that include nfc_llcp_wks_sap or nfc_llcp_build_sdreq_tlv.
  • Unexpected kernel log output containing stray or binary characters following NFC LLCP service name debug messages.
  • Dynamic debug control files under /sys/kernel/debug/dynamic_debug/control enabling NFC LLCP debug lines on production hosts.

Detection Strategies

  • Audit running kernel versions against the fixed commits (4262b12, 6d4ca87, 75bfd9e, 75f7c5a, 7dcf371, 8978dff, 8afb6c1, a143f78) referenced in the kernel git tree.
  • Enable KASAN in test or canary builds and exercise the NFC netlink interface to surface the out-of-bounds read before production exposure.
  • Monitor dmesg and journal collection pipelines for KASAN splats mentioning the NFC LLCP functions.

Monitoring Recommendations

  • Collect kernel ring buffer logs into a centralized logging platform and alert on KASAN reports.
  • Track inventory of hosts with NFC hardware or the nfc kernel module loaded, since those systems carry the attackable surface.
  • Review which users and services can open AF_NFC sockets through standard Linux capability auditing.

How to Mitigate CVE-2026-98576

Immediate Actions Required

  • Apply the kernel update that includes the upstream NFC LLCP service name logging fix as soon as the vendor publishes it for your distribution.
  • Unload or blacklist the nfc and nfc_llcp kernel modules on systems that do not require NFC functionality.
  • Disable dynamic debug for the NFC subsystem on production hosts to prevent the vulnerable code paths from executing.

Patch Information

The fix replaces the unbounded %s format specifier with %.*s and the explicit buffer length in both nfc_llcp_wks_sap() and nfc_llcp_build_sdreq_tlv(). Backports are available across stable branches. See the upstream commits: Kernel Git Commit 4262b12, Kernel Git Commit 6d4ca87, Kernel Git Commit 75bfd9e, Kernel Git Commit 75f7c5a, Kernel Git Commit 7dcf371, Kernel Git Commit 8978dff, Kernel Git Commit 8afb6c1, and Kernel Git Commit a143f78.

Workarounds

  • Blacklist the NFC modules on servers and endpoints without a legitimate NFC use case by adding blacklist nfc and blacklist nfc_llcp to /etc/modprobe.d/.
  • Disable dynamic debug entries for NFC LLCP so the vulnerable pr_debug() paths never execute.
  • Restrict CAP_NET_ADMIN and CAP_NET_RAW grants to limit which users can issue NFC netlink commands.
bash
# Disable NFC modules and dynamic debug for the LLCP code paths
echo 'blacklist nfc' | sudo tee /etc/modprobe.d/disable-nfc.conf
echo 'blacklist nfc_llcp' | sudo tee -a /etc/modprobe.d/disable-nfc.conf
sudo rmmod nfc_llcp nfc 2>/dev/null || true

# Turn off dynamic debug lines for the affected files
sudo sh -c 'echo "file net/nfc/llcp_commands.c -p" > /sys/kernel/debug/dynamic_debug/control'
sudo sh -c 'echo "file net/nfc/llcp_core.c -p" > /sys/kernel/debug/dynamic_debug/control'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.