powerpc/kexec_file: Fix null-ptr-def in extra size calculation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
powerpc/kexec_file: Fix null-ptr-def in extra size calculation
A static Sashiko AI review identified a potential NULL pointer dereference in kexec_extra_fdt_size_ppc64().
On platforms without any reserved memory regions, get_reserved_memory_ranges() can return 0 while leaving 'rmem' unallocated as NULL. Passing it directly leads to a kernel panic when evaluating 'rmem->nr_ranges'.
Add a NULL check for 'rmem' to prevent this crash.
From the CVE record · Linux
The Linux kernel’s powerpc kexec_file code can dereference a NULL pointer while calculating extra FDT size on platforms without reserved memory regions, causing a kernel panic. The input does not specify an attacker path, authentication requirements, or whether user interaction is needed.
Engineers running the Linux kernel on powerpc platforms without reserved memory regions should check their systems; affected versions are not specified.