mtd: rawnand: cadence: fix possible null-ptr-deref in cadence_nand_dt_probe()
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:
mtd: rawnand: cadence: fix possible null-ptr-deref in cadence_nand_dt_probe()
It will cause null-ptr-deref when using 'res', if platform_get_resource() returns NULL, so move using 'res' after devm_ioremap_resource() that will check it 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 Cadence raw NAND driver can dereference a null pointer in cadence_nand_dt_probe() if platform_get_resource() returns NULL. The input does not describe an attacker path or specify network access, authentication, or user-interaction requirements.
Engineers running the Linux kernel with the Cadence raw NAND driver should check their kernel version; affected versions are not specified.