i2c: core: fix adapter deregistration race
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 35fc37f8188177e3ba3e7f99a6e3300e490e9181 · < 35dbd1f1f603401155cbd3a180bb18e3a3b675b8| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
i2c: core: fix adapter deregistration race
Adapters can be looked up by their id using i2c_get_adapter() which takes a reference to the embedded struct device.
Remove the adapter from the IDR before tearing it down during deregistration (and on registration failure) to make sure its resources are not accessed after having been freed (e.g. the device name).
From the CVE record · Linux
A race between I2C adapter lookup and deregistration can let the kernel access adapter resources after they have been freed. The input does not specify how an attacker could trigger the race or whether authentication, local access, or user interaction is required.
Engineers running the Linux kernel should check their versions; affected versions were not provided.