riscv: Fix loading 64-bit NOMMU kernels past the start of RAM
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 |
|
|
6.6.306.8.96.9In the Linux kernel, the following vulnerability has been resolved:
riscv: Fix loading 64-bit NOMMU kernels past the start of RAM
commit 3335068f8721 ("riscv: Use PUD/P4D/PGD pages for the linear mapping") added logic to allow using RAM below the kernel load address. However, this does not work for NOMMU, where PAGE_OFFSET is fixed to the kernel load address. Since that range of memory corresponds to PFNs below ARCH_PFN_OFFSET, mm initialization runs off the beginning of mem_map and corrupts adjacent kernel memory. Fix this by restoring the previous behavior for NOMMU kernels.
From the CVE record · Linux
RISC-V NOMMU kernels can corrupt adjacent kernel memory during memory initialization when RAM lies below the kernel load address. The input does not describe an attacker path, authentication requirements, or user interaction.
Engineers running Linux on RISC-V NOMMU systems should check whether their kernels include the affected memory-mapping change; affected versions are not specified.