Skip to contentSkip to conversation

CVE-2026-98218: i2c: atr: fix dangling adapter pointer on add failure

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 6

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

i2c: atr: fix dangling adapter pointer on add failure

i2c_atr_add_adapter() stores atr->adapter[chan_id] before i2c_add_adapter() so that the I2C bus notifier can match child clients during registration. On failure the channel is freed but the slot was left pointing at freed memory, which can lead to use-after-free in i2c_atr_del_adapter() / cleanup and also block reuse with -EEXIST.

Clear the slot on the i2c_add_adapter() error path before freeing chan.

The Linux kernel CVE team has assigned CVE-2026-98218 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.6 with commit a076a860acae77bbdcbd316541e5552e81fb1772 and fixed in 6.6.158 with commit 2f5e42edbd232bf705dc5d3a91e06344237e63bb
	Issue introduced in 6.6 with commit a076a860acae77bbdcbd316541e5552e81fb1772 and fixed in 6.12.112 with commit 1093835f6aef58a831298d93e0d93f244fa07b84
	Issue introduced in 6.6 with commit a076a860acae77bbdcbd316541e5552e81fb1772 and fixed in 6.18.54 with commit eabf7a3d33cd9fad106d267d00cc842434de8e02
	Issue introduced in 6.6 with commit a076a860acae77bbdcbd316541e5552e81fb1772 and fixed in 7.2.8 with commit a57d9592714506556e30188af72dd3bdb9f647b5
	Issue introduced in 6.6 with commit a076a860acae77bbdcbd316541e5552e81fb1772 and fixed in 7.3-rc4 with commit ad34235808b63a70ca4989b7a2852923193d06ef

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-98218

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:

	drivers/i2c/i2c-atr.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/2f5e42edbd232bf705dc5d3a91e06344237e63bb
	https://git.kernel.org/stable/c/1093835f6aef58a831298d93e0d93f244fa07b84
	https://git.kernel.org/stable/c/eabf7a3d33cd9fad106d267d00cc842434de8e02
	https://git.kernel.org/stable/c/a57d9592714506556e30188af72dd3bdb9f647b5
	https://git.kernel.org/stable/c/ad34235808b63a70ca4989b7a2852923193d06ef