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-98582 Overview
CVE-2026-98582 affects the Linux kernel's NFC (Near Field Communication) subsystem, specifically the STMicroelectronics st21nfca I2C driver. The function st21nfca_hci_i2c_repack() fails to properly validate the size of received frames before processing byte stuffing and CRC verification. A malformed frame can place an EOF marker immediately after the start marker or terminate its data portion with an escape marker. These conditions cause the unstuffing loop to read past the current skb length, resulting in an out-of-bounds read within the kernel.
Critical Impact
Malformed NFC frames can trigger out-of-bounds reads in kernel memory, potentially leading to information disclosure or denial of service on systems using the st21nfca NFC controller.
Affected Products
- Linux kernel versions containing the drivers/nfc/st21nfca/i2c.c driver prior to the referenced stable patches
- Systems using STMicroelectronics ST21NFCA NFC controllers over I2C
- Distributions shipping affected longterm and mainline kernels
Discovery Timeline
- 2026-10-18 - CVE-2026-98582 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98582
Vulnerability Analysis
The st21nfca_hci_i2c_repack() function processes HCI (Host Controller Interface) frames received from the NFC controller over I2C. It locates the end-of-frame (EOF) marker, truncates the socket buffer (skb) at that boundary, and then removes byte stuffing in place. After unstuffing, the code assumes the remaining buffer contains an LLC header and two CRC trailer bytes.
The function unconditionally reads the byte that follows an escape marker during unstuffing. It also does not re-verify that the post-unstuffing buffer still contains enough bytes for check_crc(). These assumptions do not hold for attacker-controlled or malformed frames.
Root Cause
The root cause is improper input validation of the received frame length both before and after byte-stuffing removal. The driver mixes input and output positions within a single cursor during unstuffing, and the escape-marker handling path lacks a bounds check against the current skb length.
Attack Vector
An attacker with the ability to inject crafted frames onto the I2C transport, such as through a malicious or compromised NFC peripheral, can send a frame where the EOF marker immediately follows the start marker. This leaves too few bytes for check_crc(). Alternatively, ending the data portion with an escape marker causes the unstuffing loop to dereference a byte beyond the valid skb boundary, producing an out-of-bounds read in kernel space.
No verified public exploit code is available. See the upstream patches for implementation details of the fix.
Detection Methods for CVE-2026-98582
Indicators of Compromise
- Kernel log entries referencing st21nfca or nfc subsystem errors, oops messages, or KASAN out-of-bounds read reports tied to st21nfca_hci_i2c_repack
- Repeated NFC driver resets or I2C transfer anomalies on systems with ST21NFCA hardware
- Unexpected crashes or panics correlating with NFC activity on affected endpoints
Detection Strategies
- Enable KASAN (Kernel Address Sanitizer) on test or canary systems to catch the out-of-bounds read condition during fuzzing or validation
- Monitor dmesg and persistent kernel log collection for stack traces originating in the NFC HCI I2C codepath
- Inventory systems with NFC hardware and correlate kernel versions against the fixed commits
Monitoring Recommendations
- Centralize kernel logs from Linux endpoints and IoT devices for anomaly detection on driver-level faults
- Track kernel package versions across the fleet to confirm patch coverage on affected distributions
- Alert on repeated NFC-related kernel warnings that may indicate attempted exploitation or hardware tampering
How to Mitigate CVE-2026-98582
Immediate Actions Required
- Apply the upstream Linux kernel patches referenced in the stable tree commits once your distribution ships them
- On systems that do not require NFC functionality, unload or blacklist the st21nfca_i2c and related NFC modules
- Restrict physical access to devices with exposed NFC interfaces to reduce injection opportunities
Patch Information
The fix requires minimum framing bytes both before and after byte-stuffing removal, uses separate input and output cursors during unstuffing, and rejects an escape marker that lacks its encoded byte. The corrected logic keeps malformed frames within the received frame boundary before CRC processing. Fixes are available in the following stable commits: 57919d0, 7b996cc, 8934d28, 91be516, a653c01, d0596ee, d4008c34, and f526c21.
Workarounds
- Blacklist the st21nfca_i2c kernel module on systems that do not use NFC
- Disable NFC hardware in firmware or BIOS where supported
- Limit userspace access to NFC interfaces to trusted processes only
# Blacklist the st21nfca I2C module until the patched kernel is deployed
echo "blacklist st21nfca_i2c" | sudo tee /etc/modprobe.d/blacklist-st21nfca.conf
echo "blacklist st21nfca_hci" | sudo tee -a /etc/modprobe.d/blacklist-st21nfca.conf
sudo update-initramfs -u
sudo reboot
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

