riscv: Sync efi page table's kernel mappings before switching
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 |
|
|
5.15.826.0.126.1In the Linux kernel, the following vulnerability has been resolved:
riscv: Sync efi page table's kernel mappings before switching
The EFI page table is initially created as a copy of the kernel page table. With VMAP_STACK enabled, kernel stacks are allocated in the vmalloc area: if the stack is allocated in a new PGD (one that was not present at the moment of the efi page table creation or not synced in a previous vmalloc fault), the kernel will take a trap when switching to the efi page table when the vmalloc kernel stack is accessed, resulting in a kernel panic.
Fix that by updating the efi kernel mappings before switching to the efi page table.
From the CVE record · Linux
The Linux kernel’s RISC-V EFI page table can lack a mapping for a kernel stack allocated with VMAP_STACK enabled. Switching to that page table and accessing the stack can cause a kernel panic. The input does not describe an attacker trigger, authentication requirement, or user interaction.
Operators running Linux kernels on RISC-V with VMAP_STACK enabled should check whether their kernel includes the fix; affected versions are not specified.