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-98218 Overview
CVE-2026-98218 is a use-after-free vulnerability in the Linux kernel's I2C Address Translator (ATR) subsystem. The flaw resides in i2c_atr_add_adapter(), which stores a pointer to the new channel in atr->adapter[chan_id] before calling i2c_add_adapter(). When i2c_add_adapter() fails, the channel memory is freed but the slot continues to reference the freed allocation. Subsequent calls to i2c_atr_del_adapter() or cleanup paths can dereference the dangling pointer. The condition also blocks slot reuse with -EEXIST. The issue has been resolved upstream across multiple stable kernel branches.
Critical Impact
A dangling pointer left in the I2C ATR adapter slot after i2c_add_adapter() failure enables use-after-free during adapter deletion or cleanup, potentially leading to kernel memory corruption.
Affected Products
- Linux kernel versions containing the i2c-atr driver prior to the fix commits
- Stable kernel branches receiving backports (1093835, 2f5e42e, a57d959, ad34235, eabf7a3)
- Distributions shipping affected kernel builds with I2C ATR support enabled
Discovery Timeline
- 2026-10-06 - CVE-2026-98218 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-98218
Vulnerability Analysis
The Linux kernel I2C Address Translator (ATR) framework allows a single I2C bus to present multiple downstream buses with translated addresses. During child adapter registration, i2c_atr_add_adapter() must populate atr->adapter[chan_id] before invoking i2c_add_adapter(). This ordering is required so the I2C bus notifier can match child clients during device registration.
The defect appears on the error path. When i2c_add_adapter() returns an error, the function frees the channel structure but leaves atr->adapter[chan_id] pointing at the released memory. Any later access through that slot operates on freed memory [CWE-416]. The fix clears the slot on the i2c_add_adapter() error path before freeing the channel.
Root Cause
The root cause is improper error handling in the adapter registration sequence. The pre-registration store into the adapter array is not reverted when registration fails. This leaves two defects at once: a dangling pointer available to i2c_atr_del_adapter() and cleanup routines, and a stale non-NULL slot that causes retry attempts to fail with -EEXIST.
Attack Vector
Triggering the condition requires inducing i2c_add_adapter() to fail during ATR channel creation. Exploitation presumes local access to I2C bus management or driver load paths that exercise ATR adapter creation. The vulnerability is a kernel-local memory safety defect rather than a remote attack vector. Impact depends on allocator state and what structure replaces the freed channel memory before the dangling pointer is dereferenced.
The fix is small and targeted. Reviewers can inspect the upstream commits for the exact change to the error path in drivers/i2c/i2c-atr.c.
Detection Methods for CVE-2026-98218
Indicators of Compromise
- Kernel oops or panic messages referencing i2c_atr_del_adapter or i2c-atr call sites
- KASAN use-after-free reports naming the ATR channel allocation and freeing stack
- Repeated -EEXIST errors when loading or binding I2C ATR child drivers after a prior failure
Detection Strategies
- Enable CONFIG_KASAN on test kernels and exercise I2C ATR driver load, failure, and unload sequences
- Monitor kernel ring buffer (dmesg) for stack traces originating in drivers/i2c/i2c-atr.c
- Audit installed kernel versions against the fixed commit hashes referenced in the kernel.org advisories
Monitoring Recommendations
- Forward kern.log and journald kernel entries to a centralized log pipeline for pattern matching on ATR errors
- Alert on unexpected I2C subsystem crashes on fleet hosts that use camera, serializer, or deserializer hardware relying on ATR
- Track kernel package versions across the environment to confirm patch coverage
How to Mitigate CVE-2026-98218
Immediate Actions Required
- Update to a Linux kernel that includes one of the fix commits: 1093835, 2f5e42e, a57d959, ad34235, or eabf7a3
- Inventory systems using I2C ATR, typically embedded platforms with FPD-Link or GMSL serializer/deserializer chains
- Validate kernel update rollout with reboot and driver re-probe tests
Patch Information
The upstream fix clears atr->adapter[chan_id] on the i2c_add_adapter() error path in i2c_atr_add_adapter() before freeing the channel. The change has been backported to multiple stable kernel branches. Consult the kernel.org commit references above for the exact patch applied to each branch, and apply the distribution kernel update that incorporates the fix.
Workarounds
- Avoid dynamic rebind of I2C ATR adapters on unpatched kernels to reduce exposure to failed-add scenarios
- Where feasible, unload ATR-dependent drivers on affected hosts until a patched kernel is deployed
- Restrict local access to I2C sysfs and driver bind/unbind interfaces to privileged users only
# Verify running kernel against patched stable branches
uname -r
# Check whether i2c-atr is loaded
lsmod | grep i2c_atr
# Restrict driver bind/unbind sysfs access to root
chmod 600 /sys/bus/i2c/drivers/*/bind /sys/bus/i2c/drivers/*/unbind
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

