# CVE-2022-49004: riscv: Sync efi page table's kernel mappings before switching

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Published: 2024-10-21T20:06:17.410Z
- Modified: 2026-06-17T05:16:49.630Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In 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.

(As written by CVE List.)

## Affected

- Linux Linux: from b91540d52a08b65eb6a2b09132e1bd54fa82754c before fa7a7d185ef380546b4b1fed6f84f31dbae8cec7; from b91540d52a08b65eb6a2b09132e1bd54fa82754c before 96f479383d92944406d4b3f2bc03c2f640def9f1; from b91540d52a08b65eb6a2b09132e1bd54fa82754c before 3f105a742725a1b78766a55169f1d827732e62b8; 5.10 (not affected: before 5.10; from 5.15.82 up to 5.15.*; from 6.0.12 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 5.10 before 5.15.82; from 5.16 before 6.0.12; 6.1

## References

- <https://git.kernel.org/stable/c/fa7a7d185ef380546b4b1fed6f84f31dbae8cec7> (patch)
- <https://git.kernel.org/stable/c/96f479383d92944406d4b3f2bc03c2f640def9f1> (patch)
- <https://git.kernel.org/stable/c/3f105a742725a1b78766a55169f1d827732e62b8> (patch)

## Sources

- CVE List: [CVE-2022-49004](https://www.cve.org/CVERecord?id=CVE-2022-49004), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-49004](https://nvd.nist.gov/vuln/detail/CVE-2022-49004), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-49004 · Whole record: https://cve.day/CVE-2022-49004.json · Rebuilt by cve.day 2026-11-25T22:58:20.027Z
