Skip to content
Heist/ feed
Back to feed
UnratedFix available

riscv: Sync efi page table's kernel mappings before switching

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.15.82, 6.0.12
CVEs
CVE-2022-49004
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 17:49 UTC · Revision 1

Source evidence

riscv: Sync efi page table's kernel mappings before switching

core-osv · Original source

Published 21 Oct 2024, 20:06 UTC

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.

osv:CVE-2022-49004

Kernel

Fixed versions: 5.15.82, 6.0.12

Complete source record
{
  "id": "a655016c3c9b56547c505b2d5c60f86f3010be392015f31e979d8fd6f5dd70d5",
  "url": "https://osv.dev/vulnerability/CVE-2022-49004",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "riscv: Sync efi page table's kernel mappings before switching",
    "summary": "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.",
    "evidence": "osv:CVE-2022-49004",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.15.82",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.0.12",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-49004",
      "aliases": [
        "CVE-2022-49004"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "b91540d52a08b65eb6a2b09132e1bd54fa82754c"
                },
                {
                  "fixed": "fa7a7d185ef380546b4b1fed6f84f31dbae8cec7"
                },
                {
                  "fixed": "96f479383d92944406d4b3f2bc03c2f640def9f1"
                },
                {
                  "fixed": "3f105a742725a1b78766a55169f1d827732e62b8"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49004.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.10.0"
                },
                {
                  "fixed": "5.15.82"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.0.12"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49004.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:44.825070064Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/3f105a742725a1b78766a55169f1d827732e62b8",
        "https://git.kernel.org/stable/c/96f479383d92944406d4b3f2bc03c2f640def9f1",
        "https://git.kernel.org/stable/c/fa7a7d185ef380546b4b1fed6f84f31dbae8cec7",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49004.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-49004",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49004.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-49004",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 512587,
  "published_at": "2024-10-21T20:06:17.41+00:00"
}