CVE-2026-98977 (GCVE-0-2026-98977)
Vulnerability from cvelistv5
Published
2026-10-23 12:19
Modified
2026-10-30 12:40
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: namespace: handle mount locking for automounts correctly If mounts are propagated across user namespaces, attach_recursive_mnt() locks every copy of the source mount to protect overmounts from vanishing and revealing the underlying files or directories. The user namespace is taken from the caller's mount namespaces since this is where the mounts end up. Except, that's not always true. Automounts may legitimately get popped in by tasks located in a different mount and user namespace during path lookup. Then check doesn't make sense at that point. The copy in the namespace of the parent - which may be the host's - is now locked and the host cannot change the flags of its own mounts anymore. Here's the reproducer: - host has debugfs mounted nosuid,nodev,noexec and shared - tracefs automount below it is not yet active - hand a child process a directory descriptor on that mount - child process enters auser and mount namespace - child process' namespace now holds a locked copy of the host's debugfs mount that receives propagation from it - child process stats "tracing/." through the descriptor - lookup runs on the host's mount so the automount lands below the host's mount - propagation puts a copy below the child's copy - both try to clear the flags on the mount they got, with a bind remount: host, on its own automount: MS_REMOUNT|MS_BIND = EPERM child, on the copy in its namespace: MS_REMOUNT|MS_BIND = 0 So the lock landed on the host's mount instead of the child's copy. Congrats. So we need to compare with the owner of the namespace the mount actually gets mounted on. For all regular cases that is the caller's mount namespace and so nothing changes. Detached trees in anonymous mount namespaces by be handed over via SCM_RIGHTS or inherited in other ways on purpose so the attaching task's mount namespace is authoritative, not the creator of the detached tree.
Impacted products
Vendor Product Version
Linux Linux Version: 132c94e31b8bca8ea921f9f96a57d684fa4ae0a9
Version: 132c94e31b8bca8ea921f9f96a57d684fa4ae0a9
Version: 132c94e31b8bca8ea921f9f96a57d684fa4ae0a9
Version: 132c94e31b8bca8ea921f9f96a57d684fa4ae0a9
Version: 132c94e31b8bca8ea921f9f96a57d684fa4ae0a9
Version: 132c94e31b8bca8ea921f9f96a57d684fa4ae0a9
Version: 132c94e31b8bca8ea921f9f96a57d684fa4ae0a9
Version: 132c94e31b8bca8ea921f9f96a57d684fa4ae0a9
Version: 9c773201d61272db49f8f33a83a3cb2a3fe4b14f
Version: 3.8.6   ≤
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/namespace.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "f9b488641cfa63f9b41321530c543688b2e34f03",
              "status": "affected",
              "version": "132c94e31b8bca8ea921f9f96a57d684fa4ae0a9",
              "versionType": "git"
            },
            {
              "lessThan": "91676705756af6a59a515087b8b854c8a28d12eb",
              "status": "affected",
              "version": "132c94e31b8bca8ea921f9f96a57d684fa4ae0a9",
              "versionType": "git"
            },
            {
              "lessThan": "587d25c4b13d49c8fd05df2f71240f73bb2a058c",
              "status": "affected",
              "version": "132c94e31b8bca8ea921f9f96a57d684fa4ae0a9",
              "versionType": "git"
            },
            {
              "lessThan": "5e8f3ac8fa3d411b422ad32b9168c46a4824cc79",
              "status": "affected",
              "version": "132c94e31b8bca8ea921f9f96a57d684fa4ae0a9",
              "versionType": "git"
            },
            {
              "lessThan": "b3ccde78f1608836e62320428abc0e8aa9cf2329",
              "status": "affected",
              "version": "132c94e31b8bca8ea921f9f96a57d684fa4ae0a9",
              "versionType": "git"
            },
            {
              "lessThan": "e01c79761c7b3373e80094c5eadb21cb864fa8bc",
              "status": "affected",
              "version": "132c94e31b8bca8ea921f9f96a57d684fa4ae0a9",
              "versionType": "git"
            },
            {
              "lessThan": "6ab37fae14196ba2262b152a7d9222c50356d278",
              "status": "affected",
              "version": "132c94e31b8bca8ea921f9f96a57d684fa4ae0a9",
              "versionType": "git"
            },
            {
              "lessThan": "33aadc7c72055fca93cb5a3691d836ebf8b31c9b",
              "status": "affected",
              "version": "132c94e31b8bca8ea921f9f96a57d684fa4ae0a9",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "9c773201d61272db49f8f33a83a3cb2a3fe4b14f",
              "versionType": "git"
            },
            {
              "lessThan": "3.9",
              "status": "affected",
              "version": "3.8.6",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/namespace.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.9"
            },
            {
              "lessThan": "3.9",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.273",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.224",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.191",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.160",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.114",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.57",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.2.*",
              "status": "unaffected",
              "version": "7.2.11",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.3",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.273",
                  "versionStartIncluding": "3.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.224",
                  "versionStartIncluding": "3.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.191",
                  "versionStartIncluding": "3.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.160",
                  "versionStartIncluding": "3.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.114",
                  "versionStartIncluding": "3.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.57",
                  "versionStartIncluding": "3.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2.11",
                  "versionStartIncluding": "3.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3",
                  "versionStartIncluding": "3.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "3.8.6",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnamespace: handle mount locking for automounts correctly\n\nIf mounts are propagated across user namespaces, attach_recursive_mnt()\nlocks every copy of the source mount to protect overmounts from\nvanishing and revealing the underlying files or directories.\n\nThe user namespace is taken from the caller\u0027s mount namespaces since\nthis is where the mounts end up. Except, that\u0027s not always true.\nAutomounts may legitimately get popped in by tasks located in a\ndifferent mount and user namespace during path lookup.\n\nThen check doesn\u0027t make sense at that point. The copy in the namespace\nof the parent - which may be the host\u0027s - is now locked and the host\ncannot change the flags of its own mounts anymore.\n\nHere\u0027s the reproducer:\n\n- host has debugfs mounted nosuid,nodev,noexec and shared\n- tracefs automount below it is not yet active\n- hand a child process a directory descriptor on that mount\n- child process enters auser and mount namespace\n- child process\u0027 namespace now holds a locked copy of the host\u0027s debugfs\n  mount that receives propagation from it\n- child process stats \"tracing/.\" through the descriptor\n- lookup runs on the host\u0027s mount so the automount lands below the host\u0027s mount\n- propagation puts a copy below the child\u0027s copy\n- both try to clear the flags on the mount they got, with a bind remount:\n\n    host, on its own automount:            MS_REMOUNT|MS_BIND = EPERM\n    child, on the copy in its namespace:   MS_REMOUNT|MS_BIND = 0\n\nSo the lock landed on the host\u0027s mount instead of the child\u0027s copy.\nCongrats. So we need to compare with the owner of the namespace the\nmount actually gets mounted on. For all regular cases that is the\ncaller\u0027s mount namespace and so nothing changes.\n\nDetached trees in anonymous mount namespaces by be handed over via\nSCM_RIGHTS or inherited in other ways on purpose so the attaching task\u0027s\nmount namespace is authoritative, not the creator of the detached tree."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-10-30T12:40:39.052Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/f9b488641cfa63f9b41321530c543688b2e34f03"
        },
        {
          "url": "https://git.kernel.org/stable/c/91676705756af6a59a515087b8b854c8a28d12eb"
        },
        {
          "url": "https://git.kernel.org/stable/c/587d25c4b13d49c8fd05df2f71240f73bb2a058c"
        },
        {
          "url": "https://git.kernel.org/stable/c/5e8f3ac8fa3d411b422ad32b9168c46a4824cc79"
        },
        {
          "url": "https://git.kernel.org/stable/c/b3ccde78f1608836e62320428abc0e8aa9cf2329"
        },
        {
          "url": "https://git.kernel.org/stable/c/e01c79761c7b3373e80094c5eadb21cb864fa8bc"
        },
        {
          "url": "https://git.kernel.org/stable/c/6ab37fae14196ba2262b152a7d9222c50356d278"
        },
        {
          "url": "https://git.kernel.org/stable/c/33aadc7c72055fca93cb5a3691d836ebf8b31c9b"
        }
      ],
      "title": "namespace: handle mount locking for automounts correctly",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-98977",
    "datePublished": "2026-10-23T12:19:50.475Z",
    "dateReserved": "2026-09-25T10:25:14.383Z",
    "dateUpdated": "2026-10-30T12:40:39.052Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…