{"id":"CVE-2022-49004","state":"PUBLISHED","title":"riscv: Sync efi page table's kernel mappings before switching","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: Sync efi page table's kernel mappings before switching\n\nThe EFI page table is initially created as a copy of the kernel page table.\nWith VMAP_STACK enabled, kernel stacks are allocated in the vmalloc area:\nif the stack is allocated in a new PGD (one that was not present at the\nmoment of the efi page table creation or not synced in a previous vmalloc\nfault), the kernel will take a trap when switching to the efi page table\nwhen the vmalloc kernel stack is accessed, resulting in a kernel panic.\n\nFix that by updating the efi kernel mappings before switching to the efi\npage table.","publishedAt":"2024-10-21T20:06:17.410Z","updatedAt":"2026-05-11T18:51:20.868Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b91540d52a08b65eb6a2b09132e1bd54fa82754c","status":"affected","lessThan":"fa7a7d185ef380546b4b1fed6f84f31dbae8cec7","versionType":"git"},{"version":"b91540d52a08b65eb6a2b09132e1bd54fa82754c","status":"affected","lessThan":"96f479383d92944406d4b3f2bc03c2f640def9f1","versionType":"git"},{"version":"b91540d52a08b65eb6a2b09132e1bd54fa82754c","status":"affected","lessThan":"3f105a742725a1b78766a55169f1d827732e62b8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/include/asm/efi.h","arch/riscv/include/asm/pgalloc.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.10","versionType":"semver"},{"version":"5.15.82","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.12","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/include/asm/efi.h","arch/riscv/include/asm/pgalloc.h"]}],"references":["https://git.kernel.org/stable/c/fa7a7d185ef380546b4b1fed6f84f31dbae8cec7","https://git.kernel.org/stable/c/96f479383d92944406d4b3f2bc03c2f640def9f1","https://git.kernel.org/stable/c/3f105a742725a1b78766a55169f1d827732e62b8"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49004.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49004","state":"PUBLISHED","datePublished":"2024-10-21T20:06:17.410Z","dateUpdated":"2026-05-11T18:51:20.868Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-08-22T01:27:53.643Z"},"containers":{"cna":{"title":"riscv: Sync efi page table's kernel mappings before switching","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: Sync efi page table's kernel mappings before switching\n\nThe EFI page table is initially created as a copy of the kernel page table.\nWith VMAP_STACK enabled, kernel stacks are allocated in the vmalloc area:\nif the stack is allocated in a new PGD (one that was not present at the\nmoment of the efi page table creation or not synced in a previous vmalloc\nfault), the kernel will take a trap when switching to the efi page table\nwhen the vmalloc kernel stack is accessed, resulting in a kernel panic.\n\nFix that by updating the efi kernel mappings before switching to the efi\npage table."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b91540d52a08b65eb6a2b09132e1bd54fa82754c","status":"affected","lessThan":"fa7a7d185ef380546b4b1fed6f84f31dbae8cec7","versionType":"git"},{"version":"b91540d52a08b65eb6a2b09132e1bd54fa82754c","status":"affected","lessThan":"96f479383d92944406d4b3f2bc03c2f640def9f1","versionType":"git"},{"version":"b91540d52a08b65eb6a2b09132e1bd54fa82754c","status":"affected","lessThan":"3f105a742725a1b78766a55169f1d827732e62b8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/include/asm/efi.h","arch/riscv/include/asm/pgalloc.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.10","versionType":"semver"},{"version":"5.15.82","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.12","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/include/asm/efi.h","arch/riscv/include/asm/pgalloc.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/fa7a7d185ef380546b4b1fed6f84f31dbae8cec7"},{"url":"https://git.kernel.org/stable/c/96f479383d92944406d4b3f2bc03c2f640def9f1"},{"url":"https://git.kernel.org/stable/c/3f105a742725a1b78766a55169f1d827732e62b8"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T18:51:20.868Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"5.15.82"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"6.0.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.10","versionEndExcluding":"6.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2022-49004","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-10-22T13:14:45.523737Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-10-22T13:18:40.145Z"}}]}}}