Linux kernel out-of-bounds write in statmount string copy
- Exploited
- No known exploitation
- Fix
- Fixed in 6.12.117, 6.14
- Who is exposed
- Not reported
Summary
In the Linux kernel, the following vulnerability has been resolved:
statmount: don't copy the reserved empty string past the buffer
statmount_string() reserves an empty string at the start of the seq buffer before it calls the handler for the requested string. That's what the offsets of unset strings point to since commit e52e97f09fb6 ("statmount: let unset strings be empty").
If the handler emits nothing the early return from commit 75ead69a7173 ("fs: don't let statmount return empty strings") skips the size check against the caller's buffer. Back then an empty emission meant an empty seq buffer and there was nothing to copy. Now the reserved NUL byte is there and copy_statmount_to_user() copies it to buf + sizeof(struct statmount) no matter how small bufsize is.
So request a string that may turn out empty with a buffer that's smaller than struct statmount and the kernel writes one zero byte past the caller's buffer and reports a size that's larger than the buffer. STATMOUNT_MNT_UIDMAP or STATMOUNT_MNT_GIDMAP on a mount that isn't idmapped will do, so will STATMOUNT_FS_SUBTYPE on anything but fuse or STATMOUNT_OPT_ARRAY on a filesystem without ->show_options(). None of this needs privileges. The byte only lands in the caller's own address space but that's still not ok.
prepare_kstatmount() already refuses a buffer of exactly sizeof(struct statmount) for string requests. A smaller buffer can't hold a string either and it can't even hold the reserved empty string. So refuse any buffer that isn't larger than the fixed part. That's also what the uapi header says: string requests need space after the fixed part of the structure.
Reproducer, unprivileged, on any mount that isn't idmapped:
#define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <stdint.h> #include <stdio.h> #include <string.h> #include <sys/mman.h> #include <sys/syscall.h> #include <unistd.h> #define STATMOUNT_FS_SUBTYPE 0x00000100U #define STATMOUNT_MNT_UIDMAP 0x00002000U #define STATX_MNT_ID_UNIQUE 0x00004000U #define SM_SIZE 512 /* sizeof(struct statmount) / struct mnt_id_req { uint32_t size, mnt_ns_fd; uint64_t mnt_id, param, mnt_ns_id; }; static uint64_t root_mnt_id(void) { unsigned char stx[256]; / struct statx, stx_mnt_id at offset 144 */ uint64_t id; if (syscall(__NR_statx, AT_FDCWD, "/", 0, STATX_MNT_ID_UNIQUE, stx)) _exit(1); memcpy(&id, stx + 144, sizeof(id)); return id; } static void probe(uint64_t mnt_id, uint64_t mask, int guard) { struct mnt_id_req req = { .size = sizeof(req), .mnt_id = mnt_id, .param = mask, }; long page = sysconf(_SC_PAGESIZE); unsigned char *map, *buf; uint32_t size; long ret; map = mmap(NULL, 2 * page, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); memset(map, 0xaa, 2 * page); /* 100 byte buffer ending right at the page boundary */ buf = map + page - 100; if (guard) mprotect(map + page, page, PROT_NONE); errno = 0; ret = syscall(__NR_statmount, &req, buf, 100, 0); printf("mask 0x%04llx%s: ret %ld errno %d", (unsigned long long)mask, guard ? " guard page" : "", ret, errno); if (!guard) { memcpy(&size, buf, sizeof(size)); printf(", size 0x%x, byte[%d] 0x%02x", size, SM_SIZE, buf[SM_SIZE]); } printf("\n"); munmap(map, 2 * page); } int main(void) { uint64_t id = root_mnt_id(); probe(id, STATMOUNT_MNT_UIDMAP, 0); probe(id, STATMOUNT_FS_SUBTYPE, 0); probe(id, STATMOUNT_MNT_UIDMAP, 1); return 0; }
Before, on 7.3.0-rc7-00252-g4e3259b08c54 (vfs.fixes) in a VM, the same on a distro 7.1.13:
mask 0x2000: ret 0 errno 0, size 0x65, byte[512] 0x00 mask 0x0100: ret 0 errno 0, size 0x65, byte[512] 0x00 mask 0x2000 guard page: ret -1 errno 14
After:
mask 0x2000: ret -1 er ---truncated---
What to do
Upgrade to a fixed version: 6.12.117, 6.14.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-99952 (statmount: don't copy the reserved empty string past the buffer), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-99952 (entry last updated 2026-11-30):
Affected:
- Linux Linux: from 6.12.14, fixed in 6.12.117; from 6.13.3, fixed in 6.14
- Linux Linux: versions 6.14
Fixed versions: 6.12.117, 6.14.
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
CISA KEV: CVE-2026-99952 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-99952 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://git.kernel.org/stable/c/adbd15a2d4a92eeff7eacee40c378460d0ea0c6f
- https://git.kernel.org/stable/c/0be8ba845e49ae45cdaf60e3f38be8514efe5f00
- https://git.kernel.org/stable/c/a522c991eb26a8b011793fa41659596e6f444f67
- https://git.kernel.org/stable/c/11eef75006819f4e71d04ca2b9a1fb1580854a55
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-99952
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-99952"}.Affected versions
- Linux LinuxFrom 6.12.14 · fixed in 6.12.117; From 6.13.3 · fixed in 6.14
- Linux Linux6.14
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure?/25Unknown. No advisory context yet
- Reach20/20Affects Linux kernel (software on nearly every server, desktop or phone)
- Severity?/10Unknown. No CVSS score or vendor rating
- No patch0/5No signal
What would change the score
- Would score about 75 if added to CISA KEV
- Would score about 70 if CISA's SSVC rates exploitation active
- Would score about 42 if advisories confirm default setups are exposed
Timeline
- CVE published
- First seen by cve.now
Evidence 6
| Kind | Source |
|---|---|
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-99952 |
| Record | NVD · CVE-2026-99952 |
| Other links 4 | |
| Link | git.kernel.org · stable/c/adbd15a2d4a92eeff7eacee40c378460d0ea0c6f |
| Link | git.kernel.org · stable/c/0be8ba845e49ae45cdaf60e3f38be8514efe5f00 |
| Link | git.kernel.org · stable/c/a522c991eb26a8b011793fa41659596e6f444f67 |
| Link | git.kernel.org · stable/c/11eef75006819f4e71d04ca2b9a1fb1580854a55 |
Questions about CVE-2026-99952
Is CVE-2026-99952 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
Which versions are affected by CVE-2026-99952?
Linux: from 6.12.14 before 6.12.117; from 6.13.3 before 6.14. Linux: version 6.14.
Source: cve.now feed data
How do I fix CVE-2026-99952?
Upgrade to a fixed version: 6.12.117, 6.14.
Source: cve.now feed data
Related
- CVE-2026-139801KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM
- CVE-2026-139799mm/shmem: hold off eviction in shmem_writeout()
- CVE-2026-139792ALSA: pcm: Prevent O_APPEND open on OSS streams
- CVE-2026-139788cipso: stop modifying live ip_options_rcu
- CVE-2026-139786mm/vma: avoid spurious write locks when mm->mm_lock_seq overflows
- CVE-2026-1398009p/xen: drain response work after unbinding IRQ
No corrections so far. Something wrong on this page? Report an error.