← Back to CVE Explorer

CVE-2026-98992

Full vulnerability record from the local CVENow database.

Description

In the Linux kernel, the following vulnerability has been resolved: namespace: don't copy an unmounted mount tree may_copy_tree() accepts a mount whose root is an nsfs or pidfs file before it checks whether that mount is mounted. This exception exists for nsfs and pidfs mounts. They are part of no mount namespace so neither check_mnt() nor is_mounted() would let them through and bind-mounting a nsfsfd or a pidfd wouldn't work. Problem is that exception also admits a bind mount of such a file when it was lazily unmounted and is only kept alive by a file descriptor: mount --bind /proc/self/ns/net /tmp/x exec 3< /tmp/x umount -l /tmp/x mount --rbind /proc/self/fd/3 /tmp/y With MS_REC or AT_RECURSIVE copy_tree() doesn't stop at the unmounted mount. It copies every mount that stayed attached to it as well. So if you have a bunch of overmounts over the nsfsfd or the pidfd the whole unmounted stack is copied. That's a bug. So refuse to walk an unmounted tree. Copying its root alone stays possible. So a bind mount of a namespace that is gone can still be recreated from a file descriptor on the old one. The file descriptor pins that mount and its root and __has_locked_children() only reads the direct children which don't leave the parent's list without namespace_sem. The internal mounts carry MNT_NS_INTERNAL instead of NULL and are still walked. Copying an unmounted tree recursively fails with EINVAL.

Severity
Not scored
CVSS score
Not available
Vulnerability status
Received
Source identifier
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published
2026-10-23 13:17:21.283000
Last modified
2026-10-30 13:21:34.580000
View original CVE JSON
{
  "id": "CVE-2026-98992",
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "published": "2026-10-23T13:17:21.283",
  "lastModified": "2026-10-30T13:21:34.580",
  "vulnStatus": "Received",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnamespace: don't copy an unmounted mount tree\n\nmay_copy_tree() accepts a mount whose root is an nsfs or pidfs file\nbefore it checks whether that mount is mounted. This exception exists\nfor nsfs and pidfs mounts. They are part of no mount namespace so\nneither check_mnt() nor is_mounted() would let them through and\nbind-mounting a nsfsfd or a pidfd wouldn't work.\n\nProblem is that exception also admits a bind mount of such a file when\nit was lazily unmounted and is only kept alive by a file descriptor:\n\n  mount --bind /proc/self/ns/net /tmp/x\n  exec 3< /tmp/x\n  umount -l /tmp/x\n  mount --rbind /proc/self/fd/3 /tmp/y\n\nWith MS_REC or AT_RECURSIVE copy_tree() doesn't stop at the unmounted\nmount. It copies every mount that stayed attached to it as well. So if\nyou have a bunch of overmounts over the nsfsfd or the pidfd the whole\nunmounted stack is copied. That's a bug.\n\nSo refuse to walk an unmounted tree. Copying its root alone stays\npossible. So a bind mount of a namespace that is gone can still be\nrecreated from a file descriptor on the old one. The file descriptor\npins that mount and its root and __has_locked_children() only reads the\ndirect children which don't leave the parent's list without\nnamespace_sem. The internal mounts carry MNT_NS_INTERNAL instead of NULL\nand are still walked. Copying an unmounted tree recursively fails with\nEINVAL."
    }
  ],
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "programFiles": [
            "fs/namespace.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "e149ed2b805fefdccf7ccdfc19eca22fdd4514ac",
              "lessThan": "94d05b62dc7aea236db20166e79ee002e466393a",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e149ed2b805fefdccf7ccdfc19eca22fdd4514ac",
              "lessThan": "07c6a8f004bcc58b4ccf993e6efa7b9b8b4a1b8b",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e149ed2b805fefdccf7ccdfc19eca22fdd4514ac",
              "lessThan": "31cf157298271392ab5fb0805b28d37c8d7a8057",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e149ed2b805fefdccf7ccdfc19eca22fdd4514ac",
              "lessThan": "86a2d56b1960720bf1844441c0890621e9db2f25",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e149ed2b805fefdccf7ccdfc19eca22fdd4514ac",
              "lessThan": "7e037b1fd339d865737c8accd29abcf40130a5a0",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e149ed2b805fefdccf7ccdfc19eca22fdd4514ac",
              "lessThan": "b47b40c4f058418f9707454543179df240796aad",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e149ed2b805fefdccf7ccdfc19eca22fdd4514ac",
              "lessThan": "8d3527457e183cedee3003c2897314da49488311",
              "versionType": "git",
              "status": "affected"
            },
            {
              "version": "e149ed2b805fefdccf7ccdfc19eca22fdd4514ac",
              "lessThan": "8bacbf6be959973b28b691713a872c12eae69eec",
              "versionType": "git",
              "status": "affected"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "programFiles": [
            "fs/namespace.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "versions": [
            {
              "version": "3.19",
              "status": "affected"
            },
            {
              "version": "0",
              "lessThan": "3.19",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.10.273",
              "lessThanOrEqual": "5.10.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "5.15.224",
              "lessThanOrEqual": "5.15.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.1.191",
              "lessThanOrEqual": "6.1.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.6.160",
              "lessThanOrEqual": "6.6.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.12.113",
              "lessThanOrEqual": "6.12.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "6.18.57",
              "lessThanOrEqual": "6.18.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.2.11",
              "lessThanOrEqual": "7.2.*",
              "versionType": "semver",
              "status": "unaffected"
            },
            {
              "version": "7.3",
              "lessThanOrEqual": "*",
              "versionType": "original_commit_for_fix",
              "status": "unaffected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {},
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/07c6a8f004bcc58b4ccf993e6efa7b9b8b4a1b8b",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/31cf157298271392ab5fb0805b28d37c8d7a8057",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/7e037b1fd339d865737c8accd29abcf40130a5a0",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/86a2d56b1960720bf1844441c0890621e9db2f25",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/8bacbf6be959973b28b691713a872c12eae69eec",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/8d3527457e183cedee3003c2897314da49488311",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/94d05b62dc7aea236db20166e79ee002e466393a",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/b47b40c4f058418f9707454543179df240796aad",
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ]
}