i2c: mlxbf: Fix use-after-free in mlxbf_i2c_init_resource()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b5b5b32081cd206baa6e58cca7f112d9723785d6 · < e6a395a71f4652261d09b572a03c96052662a056| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
i2c: mlxbf: Fix use-after-free in mlxbf_i2c_init_resource()
If devm_platform_get_and_ioremap_resource() returns an error, mlxbf_i2c_init_resource() frees tmp_res before reading tmp_res->io to get the error code. This results in a use-after-free.
Save the error code before freeing tmp_res.
From the CVE record · Linux
The Linux kernel’s mlxbf I2C resource initialization has a use-after-free when devm_platform_get_and_ioremap_resource() returns an error: it frees tmp_res before reading its error code. The input does not describe how an attacker could trigger this condition or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the mlxbf I2C driver should check their versions against the kernel advisory; affected versions are not specified.