riscv: mm: add missing memcpy in kasan_init
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:
riscv: mm: add missing memcpy in kasan_init
Hi Atish,
It seems that the panic is due to the missing memcpy during kasan_init. Could you please check whether this patch is helpful?
When doing kasan_populate, the new allocated base_pud/base_p4d should contain kasan_early_shadow_{pud, p4d}'s content. Add the missing memcpy to avoid page fault when read/write kasan shadow region.
Tested on: - qemu with sv57 and CONFIG_KASAN on. - qemu with sv48 and CONFIG_KASAN on.
From the CVE record · Linux
The Linux kernel’s RISC-V KASAN initialization omits a memcpy needed to populate shadow page tables. This can cause a page fault when the KASAN shadow region is read or written; the input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels on RISC-V with CONFIG_KASAN enabled should check their deployments; affected versions are not specified.