i2c: mux: reg: check return value after calling platform_get_resource()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
i2c: mux: reg: check return value after calling platform_get_resource()
It will cause null-ptr-deref in resource_size(), if platform_get_resource() returns NULL, move calling resource_size() after devm_ioremap_resource() that will check 'res' to avoid null-ptr-deref. And use devm_platform_get_and_ioremap_resource() to simplify code.
From the CVE record · Linux
The Linux kernel’s i2c mux reg code can dereference a null pointer when platform_get_resource() returns NULL. The input does not establish how an attacker could trigger this condition or whether access, authentication, or user interaction is required.
Engineers running the Linux kernel should check their versions; the affected versions are not specified in the input.