i2c: amd-mp2: Unregister callback on adapter add failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 529766e0a0114438887382a68d97341fbf8349fb · < 1883a09a37fed497b9efacf736c23624a472246b| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
i2c: amd-mp2: Unregister callback on adapter add failure
amd_mp2_register_cb() stores the platform I2C context in the MP2 PCI driver's callback table before the adapter is registered. If i2c_add_adapter() fails, probe returns and devres frees the context, but the PCI driver can still dereference the stale pointer from its IRQ and system-sleep callbacks.
Unregister the callback before returning the adapter registration error.
From the CVE record · Linux
If amd-mp2 I2C adapter registration fails, the Linux kernel can leave a callback pointing to freed context. Later IRQ or system-sleep callbacks can dereference that pointer; the input does not establish whether an attacker can trigger this or whether authentication or user interaction is required.
Engineers running the Linux kernel with the amd-mp2 I2C driver should check their affected versions; none are specified in the input.