CVE-2022-49494: mtd: rawnand: cadence: fix possible null-ptr-deref in cadence_nand_dt_probe()
In the Linux kernel, the following vulnerability has been resolved:
mtd: rawnand: cadence: fix possible null-ptr-deref in cadencenanddtprobe()
It will cause null-ptr-deref when using 'res', if platformgetresource() returns NULL, so move using 'res' after devmioremapresource() that will check it to avoid null-ptr-deref. And use devmplatformgetandioremapresource() to simplify code.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.18.5-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.127-1Fixed in 5.18.5-1 - Compensating control
Update cadence_nand_dt_probe() to use devm_platform_get_and_ioremap_resource(), ensuring the resource is validated before it is used to prevent a null-pointer dereference when platform_get_resource() returns NULL.
Event History
Frequently Asked Questions
What is the severity of CVE-2022-49494?
CVE-2022-49494 has been classified as a low severity vulnerability.
How do I fix CVE-2022-49494?
To fix CVE-2022-49494, update the Linux kernel to a version above 5.18.3 that includes the patch.
Which versions of the Linux kernel are affected by CVE-2022-49494?
CVE-2022-49494 affects Linux kernel versions from 5.5 to 5.18.3.
What type of vulnerability is CVE-2022-49494?
CVE-2022-49494 is a null pointer dereference vulnerability in the Linux kernel.
What components are involved in CVE-2022-49494?
CVE-2022-49494 involves the MTD (Memory Technology Device) subsystem, specifically within the cadence NAND driver.