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

CVE-2026-98577: Linux Kernel NFC LLCP Privilege Escalation

CVE-2026-98577 is a privilege escalation flaw in Linux kernel NFC LLCP that allows SAP hijacking through prefix matching. This post explains its technical details, affected versions, impact, 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-98577 Overview

CVE-2026-98577 is a Linux kernel vulnerability in the Near Field Communication (NFC) Logical Link Control Protocol (LLCP) subsystem. The flaw resides in the nfc_llcp_wks_sap() function, which performs service name comparisons using only the caller-supplied service_name_len bytes. This incomplete comparison allows a short service name such as "u" to match longer Well-Known Service (WKS) strings like "urn:nfc:sn:snep". The result is Service Access Point (SAP) hijacking, where an unprivileged service can bind to or impersonate reserved WKS SAPs. The upstream fix enforces an exact length match before invoking strncmp().

Critical Impact

An attacker with the ability to register LLCP services can hijack reserved Well-Known Service SAPs, enabling impersonation of standard NFC services such as SNEP.

Affected Products

  • Linux kernel (NFC LLCP subsystem)
  • Distributions shipping affected stable kernel branches prior to the fix commits
  • Devices and systems with NFC hardware and LLCP enabled

Discovery Timeline

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

Technical Details for CVE-2026-98577

Vulnerability Analysis

The Linux kernel NFC stack implements LLCP to carry upper-layer protocols such as the Simple NDEF Exchange Protocol (SNEP) over NFC peer-to-peer links. The nfc_llcp_wks_sap() helper is responsible for mapping a requested service name to the correct Well-Known Service SAP number. The helper iterates through the reserved WKS name table and compares entries using strncmp() bounded by service_name_len.

Because the comparison length is derived from the caller's input, any shorter name that forms a prefix of a reserved WKS name produces a false match. For example, a caller requesting a service named "u" matches the entry "urn:nfc:sn:snep" on the first byte. The function then returns the reserved SAP associated with the longer well-known service.

The practical consequence is service identity confusion within the NFC LLCP namespace. A locally registered service can claim a reserved SAP such as the one bound to SNEP, intercepting or disrupting standard NFC exchanges with peer devices.

Root Cause

The root cause is improper input validation [CWE-20] in service-name comparison logic. nfc_llcp_wks_sap() uses a length-bounded string comparison without first verifying that the caller's service_name_len equals the length of the reserved WKS entry. The patch adds an explicit length equality check before invoking strncmp(), ensuring only exact matches resolve to reserved SAPs.

Attack Vector

Exploitation requires local access to a system with the NFC LLCP subsystem compiled and reachable. An attacker with the capability to create LLCP sockets and register service names can submit a crafted short name that acts as a prefix of a Well-Known Service string. The kernel then assigns the reserved WKS SAP to the attacker-controlled service, enabling impersonation of standard NFC services. Remote exploitation is not described in the advisory; the attack surface is bounded by the ability to register LLCP services on the affected host.

No public proof-of-concept code has been published. Refer to the upstream kernel commits for the authoritative patch details.

Detection Methods for CVE-2026-98577

Indicators of Compromise

  • Unexpected LLCP service registrations binding to Well-Known Service SAPs on systems where only standard NFC services should hold those slots.
  • Kernel audit records showing processes registering short or single-character NFC LLCP service names.
  • Anomalous NFC peer-to-peer session behavior, including SNEP exchanges terminating at unexpected user-space endpoints.

Detection Strategies

  • Inventory running kernel versions and compare against the fixed stable branches referenced in the upstream commits (0a04127, 0c83a8a, 32b5f0b, 408cff6, 6fad2c3, aa555ed, bf41af8, f234197).
  • Enable auditd rules covering socket() calls with the AF_NFC family and subsequent bind() operations to flag unusual LLCP service registrations.
  • Correlate NFC driver load events with user-space processes that are not part of the expected NFC service stack.

Monitoring Recommendations

  • Monitor kernel logs for NFC LLCP registration messages and investigate entries referencing short service names.
  • Track invocations of NFC-related syscalls on endpoints that do not require NFC functionality and alert on anomalies.
  • Review software bill of materials for kernels built with CONFIG_NFC and CONFIG_NFC_LLCP on systems lacking the patch.

How to Mitigate CVE-2026-98577

Immediate Actions Required

  • Apply the stable kernel updates containing the fix commits listed in the upstream references as soon as they are available from your distribution.
  • On systems that do not use NFC, disable or unload the nfc and nfc_llcp kernel modules to remove the attack surface entirely.
  • Restrict local account access on devices with NFC hardware, since exploitation requires the ability to register LLCP services locally.

Patch Information

The fix enforces an exact length match before invoking strncmp() in nfc_llcp_wks_sap(). The patch has been backported across multiple stable kernel branches. See the upstream commits: Kernel Git Commit 0a04127, Kernel Git Commit 0c83a8a, Kernel Git Commit 32b5f0b, Kernel Git Commit 408cff6, Kernel Git Commit 6fad2c3, Kernel Git Commit aa555ed, Kernel Git Commit bf41af8, and Kernel Git Commit f234197.

Workarounds

  • Blacklist the nfc and nfc_llcp kernel modules on systems that do not require NFC services.
  • Use kernel module signing and modprobe restrictions to prevent unprivileged loading of the NFC stack.
  • Apply mandatory access control policies (SELinux, AppArmor) to restrict which processes may open AF_NFC sockets.
bash
# Blacklist NFC modules on systems that do not need NFC
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 update-initramfs -u

# Verify modules are not loaded
lsmod | grep -E 'nfc|llcp'

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.