{"id":"CVE-2024-26795","state":"PUBLISHED","title":"riscv: Sparse-Memory/vmemmap out-of-bounds fix","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: Sparse-Memory/vmemmap out-of-bounds fix\n\nOffset vmemmap so that the first page of vmemmap will be mapped\nto the first page of physical memory in order to ensure that\nvmemmap’s bounds will be respected during\npfn_to_page()/page_to_pfn() operations.\nThe conversion macros will produce correct SV39/48/57 addresses\nfor every possible/valid DRAM_BASE inside the physical memory limits.\n\nv2:Address Alex's comments","publishedAt":"2024-04-04T08:20:25.063Z","updatedAt":"2026-08-05T11:27:18.433Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d95f1a542c3df396137afa217ef9bd39cb8931ca","status":"affected","lessThan":"5941a90c55d3bfba732b32208d58d997600b44ef","versionType":"git"},{"version":"d95f1a542c3df396137afa217ef9bd39cb8931ca","status":"affected","lessThan":"8310080799b40fd9f2a8b808c657269678c149af","versionType":"git"},{"version":"d95f1a542c3df396137afa217ef9bd39cb8931ca","status":"affected","lessThan":"a278d5c60f21aa15d540abb2f2da6e6d795c3e6e","versionType":"git"},{"version":"d95f1a542c3df396137afa217ef9bd39cb8931ca","status":"affected","lessThan":"2a1728c15ec4f45ed9248ae22f626541c179bfbe","versionType":"git"},{"version":"d95f1a542c3df396137afa217ef9bd39cb8931ca","status":"affected","lessThan":"a11dd49dcb9376776193e15641f84fcc1e5980c9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/include/asm/pgtable.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.4","versionType":"semver"},{"version":"5.15.151","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.81","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.21","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.9","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","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/pgtable.h"]}],"references":["https://git.kernel.org/stable/c/5941a90c55d3bfba732b32208d58d997600b44ef","https://git.kernel.org/stable/c/8310080799b40fd9f2a8b808c657269678c149af","https://git.kernel.org/stable/c/a278d5c60f21aa15d540abb2f2da6e6d795c3e6e","https://git.kernel.org/stable/c/2a1728c15ec4f45ed9248ae22f626541c179bfbe","https://git.kernel.org/stable/c/a11dd49dcb9376776193e15641f84fcc1e5980c9","https://git.kernel.org/stable/c/8af1c121b0102041809bc137ec600d1865eaeedd","https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:10.607Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/26xxx/CVE-2024-26795.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-26795","state":"PUBLISHED","datePublished":"2024-04-04T08:20:25.063Z","dateUpdated":"2026-08-05T11:27:18.433Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-19T14:20:24.178Z"},"containers":{"cna":{"title":"riscv: Sparse-Memory/vmemmap out-of-bounds fix","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: Sparse-Memory/vmemmap out-of-bounds fix\n\nOffset vmemmap so that the first page of vmemmap will be mapped\nto the first page of physical memory in order to ensure that\nvmemmap’s bounds will be respected during\npfn_to_page()/page_to_pfn() operations.\nThe conversion macros will produce correct SV39/48/57 addresses\nfor every possible/valid DRAM_BASE inside the physical memory limits.\n\nv2:Address Alex's comments"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d95f1a542c3df396137afa217ef9bd39cb8931ca","status":"affected","lessThan":"5941a90c55d3bfba732b32208d58d997600b44ef","versionType":"git"},{"version":"d95f1a542c3df396137afa217ef9bd39cb8931ca","status":"affected","lessThan":"8310080799b40fd9f2a8b808c657269678c149af","versionType":"git"},{"version":"d95f1a542c3df396137afa217ef9bd39cb8931ca","status":"affected","lessThan":"a278d5c60f21aa15d540abb2f2da6e6d795c3e6e","versionType":"git"},{"version":"d95f1a542c3df396137afa217ef9bd39cb8931ca","status":"affected","lessThan":"2a1728c15ec4f45ed9248ae22f626541c179bfbe","versionType":"git"},{"version":"d95f1a542c3df396137afa217ef9bd39cb8931ca","status":"affected","lessThan":"a11dd49dcb9376776193e15641f84fcc1e5980c9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/include/asm/pgtable.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.4","versionType":"semver"},{"version":"5.15.151","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.81","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.21","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.9","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","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/pgtable.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/5941a90c55d3bfba732b32208d58d997600b44ef"},{"url":"https://git.kernel.org/stable/c/8310080799b40fd9f2a8b808c657269678c149af"},{"url":"https://git.kernel.org/stable/c/a278d5c60f21aa15d540abb2f2da6e6d795c3e6e"},{"url":"https://git.kernel.org/stable/c/2a1728c15ec4f45ed9248ae22f626541c179bfbe"},{"url":"https://git.kernel.org/stable/c/a11dd49dcb9376776193e15641f84fcc1e5980c9"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The defective `vmemmap` conversion is core arch/MM code exercised through ordinary local syscalls (page faults, mmap, read/write, fork, GUP/DMA setup); it is not reachable as a distinct remote protocol surface. Exploitation therefore requires local execution on the affected RISC-V system.\nAC:L - On an affected RISC-V deployment the out-of-bounds `pfn_to_page()`/`page_to_pfn()` result is deterministic — no race, no memory-layout guessing, no timing window — and any unprivileged memory operation reaches it reliably. Per CVSS 3.1 the vulnerable configuration is assumed, and nothing extra beyond the attacker's control must hold.\nPR:L - No capability, namespace, or admin check guards `pfn_to_page()`/`page_to_pfn()`; a plain unprivileged user process touching pages, mapping memory, or issuing I/O drives the miscomputed conversion. Only a basic local account is needed.\nUI:N - No victim action, mount, or file open is required — the corrupted address computation is hit by the attacker's own ordinary memory operations.\nS:U - The out-of-bounds accesses stay within kernel virtual memory (vmemmap spilling into the adjacent vmalloc region); no VM, IOMMU, or sandbox boundary is crossed.\nC:H - `struct page` accesses land outside the vmemmap region in the vmalloc area holding VMAP_STACK kernel stacks and module data, and `page_to_pfn()` returns wrong PFNs so the wrong physical pages are mapped to userspace or DMA'd — yielding disclosure of arbitrary kernel and other-process memory.\nI:H - The same aliasing gives an out-of-bounds *write*: refcount/flag/mapping updates to `struct page` overwrite vmalloc-region kernel data, and wrong PFNs cause the wrong physical pages to be written, a memory-corruption primitive usable for control-flow hijacking.\nA:H - Overlapping the struct page array with vmalloc allocations and kernel stacks reliably produces oopses, BUG_ONs, and full kernel panics on the affected platform."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:27:18.433Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"5.15.151"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.1.81"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.6.21"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.7.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4","versionEndExcluding":"6.8"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-06-17T19:27:22.580328Z","id":"CVE-2024-26795","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-17T19:27:29.143Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/8af1c121b0102041809bc137ec600d1865eaeedd","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/5941a90c55d3bfba732b32208d58d997600b44ef","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/8310080799b40fd9f2a8b808c657269678c149af","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/a278d5c60f21aa15d540abb2f2da6e6d795c3e6e","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/2a1728c15ec4f45ed9248ae22f626541c179bfbe","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/a11dd49dcb9376776193e15641f84fcc1e5980c9","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T00:14:13.470Z"}}]}}}