GHSA-WJ7X-5FHW-PC95
Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-11-30 15:32In the Linux kernel, the following vulnerability has been resolved:
mm/mlock: use a long for the page count in mlock_fixup()
mlock_fixup() adjusts mm->locked_vm, an unsigned long, by the number of pages whose VM_LOCKED state it changes, but computes that number in an int:
int nr_pages;
...
nr_pages = (end - start) >> PAGE_SHIFT;
...
mm->locked_vm += nr_pages;
When a single VMA range of 2^31 pages (8 TiB with 4 KiB pages) or more is locked or unlocked, the count is truncated to 32 bits and then sign-extended, so locked_vm is changed by the wrong amount, while munmap(), mremap() and the other paths that maintain locked_vm use the full unsigned long page count.
Such a range is reachable on 64-bit architectures with a 47-bit or larger user address space (x86_64, arm64 with 48-bit VA, riscv64 Sv48) by a task with CAP_IPC_LOCK or a raised RLIMIT_MEMLOCK, which do_mlock() checks against the full untruncated length. It costs nothing with MAP_NORESERVE and MLOCK_ONFAULT/MCL_ONFAULT, since then no page is populated. On x86_64, after
p = mmap(NULL, 8UL << 40, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
mlock2(p, 8UL << 40, MLOCK_ONFAULT);
VmLck in /proc/self/status reads 18446744065119617024 kB instead of 8589934592 kB; munmap() of the region then subtracts the true size and leaves VmLck at 18446744056529682432 kB instead of 0. With 16 TiB, locked_vm is not changed at all, VmLck stays 0 kB, and after the task drops CAP_IPC_LOCK or lowers RLIMIT_MEMLOCK, mlock(), mmap(MAP_LOCKED) and the other mlock_future_ok() and account_locked_vm() users enforce RLIMIT_MEMLOCK against that count, so they let the task lock memory beyond its limit (or, in the 8 TiB case, refuse every further lock). The error persists for the life of the mm; unlocking the range in pieces skews it further. The wrong count is per-mm accounting only: it does not change which pages are locked.
The int has been there since before git history (the variable was named "pages" until it was renamed in 2.6.28); every other updater of locked_vm uses an unsigned long or long count. Make nr_pages a long, which holds the page count of any user range and its negation, so the existing sign handling is unchanged.
Found by formal verification of mm/mlock.c against the kernel binary.
{
"affected": [],
"aliases": [
"CVE-2026-99920"
],
"database_specific": {
"cwe_ids": [],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-30T14:20:28Z",
"severity": null
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mlock: use a long for the page count in mlock_fixup()\n\nmlock_fixup() adjusts mm-\u003elocked_vm, an unsigned long, by the number of\npages whose VM_LOCKED state it changes, but computes that number in an\nint:\n\n\tint nr_pages;\n\t...\n\tnr_pages = (end - start) \u003e\u003e PAGE_SHIFT;\n\t...\n\tmm-\u003elocked_vm += nr_pages;\n\nWhen a single VMA range of 2^31 pages (8 TiB with 4 KiB pages) or more\nis locked or unlocked, the count is truncated to 32 bits and then\nsign-extended, so locked_vm is changed by the wrong amount, while\nmunmap(), mremap() and the other paths that maintain locked_vm use the\nfull unsigned long page count.\n\nSuch a range is reachable on 64-bit architectures with a 47-bit or\nlarger user address space (x86_64, arm64 with 48-bit VA, riscv64 Sv48)\nby a task with CAP_IPC_LOCK or a raised RLIMIT_MEMLOCK, which do_mlock()\nchecks against the full untruncated length. It costs nothing with\nMAP_NORESERVE and MLOCK_ONFAULT/MCL_ONFAULT, since then no page is\npopulated. On x86_64, after\n\n\tp = mmap(NULL, 8UL \u003c\u003c 40, PROT_READ | PROT_WRITE,\n\t\t MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);\n\tmlock2(p, 8UL \u003c\u003c 40, MLOCK_ONFAULT);\n\nVmLck in /proc/self/status reads 18446744065119617024 kB instead of\n8589934592 kB; munmap() of the region then subtracts the true size and\nleaves VmLck at 18446744056529682432 kB instead of 0. With 16 TiB,\nlocked_vm is not changed at all, VmLck stays 0 kB, and after the task\ndrops CAP_IPC_LOCK or lowers RLIMIT_MEMLOCK, mlock(), mmap(MAP_LOCKED)\nand the other mlock_future_ok() and account_locked_vm() users enforce\nRLIMIT_MEMLOCK against that count, so they let the task lock memory\nbeyond its limit (or, in the 8 TiB case, refuse every further lock).\nThe error persists for the life of the mm; unlocking the range in pieces\nskews it further. The wrong count is per-mm accounting only: it does\nnot change which pages are locked.\n\nThe int has been there since before git history (the variable was named\n\"pages\" until it was renamed in 2.6.28); every other updater of\nlocked_vm uses an unsigned long or long count. Make nr_pages a long,\nwhich holds the page count of any user range and its negation, so the\nexisting sign handling is unchanged.\n\nFound by formal verification of mm/mlock.c against the kernel binary.",
"id": "GHSA-wj7x-5fhw-pc95",
"modified": "2026-11-30T15:32:49Z",
"published": "2026-11-30T15:32:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99920"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/29a776866a79df875295ac30bb3551ed1a67d1cd"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/3ae91e3079b1504ef162b2884454d5f1421f4eb9"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/7c2e3a553fd473a4dd78483bf12d8168151d3e0a"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/91ac9d062a278ff5def4e3cd44209e00d7d14488"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/a65767efb08a8ea6cc721258526c9aea752896ca"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/b0f3684537dde69781dcb1887443fe4256052bbb"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/b14b9f590543d50f4ece4024a3240449f2970e51"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/fe6e1017449126be6ae477483945c31ea1b0a03e"
}
],
"schema_version": "1.4.0",
"severity": []
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.