Linux Kernel
CVE-2025-68211
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain local unprivileged shell
-
Exploitmmap huge sparse region with MADV_MERGEABLE
-
Executionksmd range-scans empty address space
-
ImpactCPU exhaustion degrades KSM/host
Vulnerability Assessment
| Exploitation Conditions | Requires (1) local access as an unprivileged user (PR:L), and (2) Kernel Samepage Merging actively enabled by an administrator (writing 1 to /sys/kernel/mm/ksm/run), which is NOT the default on most distributions. The attacker then creates a large, mostly-unmapped VMA and marks it MADV_MERGEABLE so ksmd wastes CPU scanning holes. Exploitation is strictly limited to Linux 6.18 release-candidate kernels (rc1-rc4) per the CPE data, has no remote vector, and causes only availability degradation of the KSM scanning thread - no code execution, data disclosure, or memory corruption. |
| Impact | All signals point to a low-priority, locally-scoped denial-of-service rather than a security emergency. The CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H, 5.5 Medium) describes a local, authenticated-user-triggerable availability-only issue with no confidentiality or integrity impact - consistent with the description, which is a kernel efficiency fix for ksmd burning 100% CPU scanning huge sparse VMAs. EPSS is 0.15% (3rd percentile), there is no CISA KEV listing and no public exploit identified, so there is no evidence of exploitation interest. Critically, the affected versions per CPE are only Linux 6.18-rc1 through rc4 (pre-release candidates), which effectively eliminates production exposure. One data conflict to note: the input Tags label this 'Information Disclosure', which contradicts the CVSS impact metrics (C:N/I:N/A:H) - this is an availability/DoS issue, not information disclosure, and the tag appears mislabeled. |
| Exploit ScenarioDerived | A local user on a host with KSM enabled (echo 1 > /sys/kernel/mm/ksm/run) maps a very large, mostly-unmapped region (e.g. 32 TiB) with MADV_MERGEABLE, causing ksmd to spin at 100% CPU for over an hour walking empty address space and starving the system of CPU for merge work. No public exploit code exists; the CVE description itself includes a benign reproducer, and the local vector with low complexity (AV:L/AC:L) makes triggering trivial for an unprivileged local user once KSM is active. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
Kernel Samepage Merging (KSM) in the Linux kernel can be forced to consume a full CPU core for extended periods by a local unprivileged user who creates a huge, almost entirely unmapped virtual memory area and marks it mergeable with MADV_MERGEABLE, causing the ksmd scanner to walk every page address in the VMA instead of skipping the unmapped holes. The flaw is a locally scoped availability issue (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H, base 5.5) rather than a memory-corruption or disclosure bug; it requires KSM to have been explicitly enabled by an administrator (writing 1 to /sys/kernel/mm/ksm/run), which is not the default on most distributions. The affected code is confined to Linux 6.18 release-candidate kernels (rc1 through rc4) per the supplied CPE data, and no public exploit code or active exploitation has been identified at time of analysis, with EPSS at roughly 0.15% (3rd percentile) reflecting the low practical risk. Vendor fixes exist as stable-branch kernel commits, so the practical exposure is limited to systems running pre-release 6.18 kernels with KSM turned on.
RemediationAI
Apply the vendor fix by moving off the affected 6.18-rc kernels to a release that contains the range-walk rewrite of scan_get_next_rmap_item(); the upstream patches are the stable-tree commits referenced in the advisories (git.kernel.org/stable/c/10644e8839544dd5699c03c8fb1aeeefc41602fd, 220cb3e425e17587f560335924cba9f16a842c64, 67137b715b7db28d82e4ed07a7092c2fa6ba7adb, 74f78421c925b6d17695566f0c5941de57fd44b3, 9c2f8a9b68024e5ebb4813665845ec0a95f2eac3, f5548c318d6520d4fa3c5ed6003eeb710763cbc5 and f62973e0767e4fcd6799087787fca08ca2a85b8c), and the exact released kernel version should be confirmed against the distribution's own errata since the supplied data does not enumerate specific patched release numbers. Where an immediate kernel upgrade is not possible, the most direct compensating control is to disable KSM by ensuring /sys/kernel/mm/ksm/run is set to 0, with the trade-off that all memory deduplication is lost and consolidated workloads may see higher physical memory consumption; alternatively, keep KSM enabled only for trusted, non-attacker-controllable VMAs and avoid marking large sparse mappings MADV_MERGEABLE, which reduces deduplication coverage for legitimate sparse workloads but denies the trigger. Because the attack is purely local and requires an already-running unprivileged process, restricting who can execute untrusted code on hosts with KSM enabled, or running untrusted tenants on hosts where KSM is disabled, removes the exposure without degrading other kernel subsystems. Note that the reference tags include 'Information Disclosure', but the assessed vector and impact show availability-only degradation, so remediation should be prioritized as a low-urgency local DoS fix rather than as a confidentiality issue.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
KSM is a Linux memory-deduplication feature implemented by the ksmd kernel thread: when userspace calls madvise(MADV_MERGEABLE) on a range, KSM tracks those virtual memory areas via anon_vma structures and periodically scans them looking for identical pages to merge. The vulnerable function, scan_get_next_rmap_item(), walked the virtual address space of each registered VMA one page address at a time to find mergeable pages, which is O(number of pages in the VMA) even when nearly all of those pages are unmapped holes. The fix replaces the per-address iteration with a range walk built on walk_page_range(), letting the scanner jump over contiguous unmapped regions and only inspect addresses that actually have mappings. The underlying resource type is the kernel's page-table/VMA walking infrastructure and the KSM scan loop; no CWE was assigned in the supplied data, but the defect maps to the uncontrolled-resource-consumption class (algorithmic inefficiency leading to CPU exhaustion) rather than to memory corruption, race, or injection classes. From a design standpoint the issue is not exploitable for privilege escalation: the affected input is a legal mmap()/madvise() sequence, and the consequence is purely that the ksmd thread monopolizes a CPU core and becomes effectively unable to perform useful deduplication, which constitutes a local denial-of-service against the KSM service and, indirectly, against overall system throughput.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Local unprivileged user triggers the condition (AV:L/PR:L), trivially via standard syscalls (AC:L); impact is availability-only CPU exhaustion of ksmd with no C/I impact.
Primary rating from NVD.
CVSS VectorNVD
DescriptionNVD
In the Linux kernel, the following vulnerability has been resolved:
ksm: use range-walk function to jump over holes in scan_get_next_rmap_item
Currently, scan_get_next_rmap_item() walks every page address in a VMA to locate mergeable pages. This becomes highly inefficient when scanning large virtual memory areas that contain mostly unmapped regions, causing ksmd to use large amount of cpu without deduplicating much pages.
This patch replaces the per-address lookup with a range walk using walk_page_range(). The range walker allows KSM to skip over entire unmapped holes in a VMA, avoiding unnecessary lookups. This problem was previously discussed in [1].
Consider the following test program which creates a 32 TiB mapping in the virtual address space but only populates a single page:
#include <unistd.h> #include <stdio.h> #include <sys/mman.h>
/* 32 TiB */ const size_t size = 32ul * 1024 * 1024 * 1024 * 1024;
int main() { char *area = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_NORESERVE | MAP_PRIVATE | MAP_ANON, -1, 0);
if (area == MAP_FAILED) { perror("mmap() failed\n"); return -1; }
/* Populate a single page such that we get an anon_vma. */ *area = 0;
/* Enable KSM. */ madvise(area, size, MADV_MERGEABLE); pause(); return 0; }
$ ./ksm-sparse & $ echo 1 > /sys/kernel/mm/ksm/run
Without this patch ksmd uses 100% of the cpu for a long time (more then 1 hour in my test machine) scanning all the 32 TiB virtual address space that contain only one mapped page. This makes ksmd essentially deadlocked not able to deduplicate anything of value. With this patch ksmd walks only the one mapped page and skips the rest of the 32 TiB virtual address space, making the scan fast using little cpu.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
NVD
CVE.org
EPSS
GitHub PoC
Exploit-DB