{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99952","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-09-25T10:25:14.448Z","datePublished":"2026-11-30T13:18:35.002Z","dateUpdated":"2026-11-30T13:18:35.002Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-11-30T13:18:35.002Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nstatmount: don't 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's\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't let statmount return empty strings\") skips the size check\nagainst the caller's 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's\nsmaller than struct statmount and the kernel writes one zero byte past\nthe caller's buffer and reports a size that's larger than the buffer.\nSTATMOUNT_MNT_UIDMAP or STATMOUNT_MNT_GIDMAP on a mount that isn't\nidmapped will do, so will STATMOUNT_FS_SUBTYPE on anything but fuse or\nSTATMOUNT_OPT_ARRAY on a filesystem without ->show_options(). None of\nthis needs privileges. The byte only lands in the caller's own address\nspace but that's still not ok.\n\nprepare_kstatmount() already refuses a buffer of exactly sizeof(struct\nstatmount) for string requests. A smaller buffer can't hold a string\neither and it can't even hold the reserved empty string. So refuse any\nbuffer that isn't larger than the fixed part. That's 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't idmapped:\n\n    #define _GNU_SOURCE\n    #include <errno.h>\n    #include <fcntl.h>\n    #include <stdint.h>\n    #include <stdio.h>\n    #include <string.h>\n    #include <sys/mman.h>\n    #include <sys/syscall.h>\n    #include <unistd.h>\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(&id, 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, &req, 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(&size, 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---"}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/namespace.c"],"versions":[{"version":"d49c64c1d723c167f521833f429ab28d3ca7e0d9","lessThan":"adbd15a2d4a92eeff7eacee40c378460d0ea0c6f","status":"affected","versionType":"git"},{"version":"e52e97f09fb66fd868260d05bd6b74a9a3db39ee","lessThan":"0be8ba845e49ae45cdaf60e3f38be8514efe5f00","status":"affected","versionType":"git"},{"version":"e52e97f09fb66fd868260d05bd6b74a9a3db39ee","lessThan":"a522c991eb26a8b011793fa41659596e6f444f67","status":"affected","versionType":"git"},{"version":"e52e97f09fb66fd868260d05bd6b74a9a3db39ee","lessThan":"11eef75006819f4e71d04ca2b9a1fb1580854a55","status":"affected","versionType":"git"},{"version":"c3787a4fae66e710543137b4b1b073cb2bff3bca","status":"affected","versionType":"git"},{"version":"6.12.14","lessThan":"6.12.117","status":"affected","versionType":"semver"},{"version":"6.13.3","lessThan":"6.14","status":"affected","versionType":"semver"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/namespace.c"],"versions":[{"version":"6.14","status":"affected"},{"version":"0","lessThan":"6.14","status":"unaffected","versionType":"semver"},{"version":"6.12.117","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.63","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12.14","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"6.18.63"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"7.4-rc1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13.3"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/adbd15a2d4a92eeff7eacee40c378460d0ea0c6f"},{"url":"https://git.kernel.org/stable/c/0be8ba845e49ae45cdaf60e3f38be8514efe5f00"},{"url":"https://git.kernel.org/stable/c/a522c991eb26a8b011793fa41659596e6f444f67"},{"url":"https://git.kernel.org/stable/c/11eef75006819f4e71d04ca2b9a1fb1580854a55"}],"title":"statmount: don't copy the reserved empty string past the buffer","x_generator":{"engine":"bippy-1.2.0"}}}}