GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2025-40203 (GCVE-0-2025-40203)

Vulnerability from cvelistv5 – Published: 2025-11-12 21:56 – Updated: 2026-08-05 12:08
VLAI
Title
listmount: don't call path_put() under namespace semaphore
Summary
In the Linux kernel, the following vulnerability has been resolved: listmount: don't call path_put() under namespace semaphore Massage listmount() and make sure we don't call path_put() under the namespace semaphore. If we put the last reference we're fscked.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: b4c2bea8ceaa50cd42a8f73667389d801a3ecf2d , < 659874b7ee4976ad9ce476e07fd36bc67b3537f1 (git)
Affected: b4c2bea8ceaa50cd42a8f73667389d801a3ecf2d , < 9c80da26fda2fdcaac7f92b5908875b3108830ff (git)
Affected: b4c2bea8ceaa50cd42a8f73667389d801a3ecf2d , < c1f86d0ac322c7e77f6f8dbd216c65d39358ffc0 (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.8
Unaffected: 0 , < 6.8 (semver)
Unaffected: 6.12.54 , ≤ 6.12.* (semver)
Unaffected: 6.17.4 , ≤ 6.17.* (semver)
Unaffected: 6.18 , ≤ * (original_commit_for_fix)
guessed 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": "659874b7ee4976ad9ce476e07fd36bc67b3537f1",
              "status": "affected",
              "version": "b4c2bea8ceaa50cd42a8f73667389d801a3ecf2d",
              "versionType": "git"
            },
            {
              "lessThan": "9c80da26fda2fdcaac7f92b5908875b3108830ff",
              "status": "affected",
              "version": "b4c2bea8ceaa50cd42a8f73667389d801a3ecf2d",
              "versionType": "git"
            },
            {
              "lessThan": "c1f86d0ac322c7e77f6f8dbd216c65d39358ffc0",
              "status": "affected",
              "version": "b4c2bea8ceaa50cd42a8f73667389d801a3ecf2d",
              "versionType": "git"
            }
          ]
        },
        {
          "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": "6.8"
            },
            {
              "lessThan": "6.8",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.54",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.54",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17.4",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nlistmount: don\u0027t call path_put() under namespace semaphore\n\nMassage listmount() and make sure we don\u0027t call path_put() under the\nnamespace semaphore. If we put the last reference we\u0027re fscked."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerability is reached only through the `listmount(2)` system call in fs/namespace.c; there is no remote or adjacent-network path to `do_listmount()`. Exploitation requires the ability to execute syscalls on the target, i.e. local access.\nAC:L - The attacker controls both sides of the race \u2014 it holds the extra path reference via `listmount()` while a `CLONE_FS` sibling thread moves `fs-\u003eroot` off a lazily-unmounted mount, deterministically making the in-syscall `path_put()` the final reference. The setup (unshare, tmpfs mount, chroot, `umount2(MNT_DETACH)`) is scripted and retryable without limit.\nPR:L - `listmount(2)` requires no capability at all for the caller\u0027s own mount namespace, and the mount/chroot/lazy-umount setup is obtainable by any unprivileged user via `unshare -Ur` since CAP_SYS_ADMIN/CAP_SYS_CHROOT are granted inside a user namespace. No real root in the init namespace is needed.\nUI:N - The attacking process performs every step itself \u2014 namespace creation, mount setup, and the concurrent `listmount()`/`chroot()` race. No victim action or cooperation is involved.\nS:U - The corrupted state (`struct mount`, `struct mountpoint`, `struct dentry`, `namespace_sem`) and the resulting impact all live within the kernel\u0027s own security authority. No hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - The final `mntput_no_expire()` tears down mounts, frees `struct mountpoint`, and destroys dentries/inodes while only the read side of `namespace_sem` is held, so concurrent readers (other `listmount()`/`statmount()`/propagation walkers that legitimately hold the read lock and expect a stable topology) can traverse freed objects \u2014 a use-after-free giving an attacker-influenceable kernel-memory read primitive via slab reuse.\nI:H - The same violated invariant permits mount-tree list surgery (`list_del(\u0026mnt-\u003emnt_instance)`, `unhash_mnt()`, child reparenting) to race concurrent read-side traversal, yielding linked-list corruption and use-after-free writes into reallocated slab objects, which is exploitable for control-flow hijacking.\nA:H - Performing the final `path_put()` under `namespace_sem` can block or self-deadlock \u2014 inode eviction can stall indefinitely on a userspace filesystem daemon, and `__detach_mounts()`\u0027s `down_write(\u0026namespace_sem)` on an already read-held semaphore deadlocks \u2014 hanging every mount, umount, statmount, and listmount on the system; the same UAF also reliably oopses the kernel."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:08:32.046Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/659874b7ee4976ad9ce476e07fd36bc67b3537f1"
        },
        {
          "url": "https://git.kernel.org/stable/c/9c80da26fda2fdcaac7f92b5908875b3108830ff"
        },
        {
          "url": "https://git.kernel.org/stable/c/c1f86d0ac322c7e77f6f8dbd216c65d39358ffc0"
        }
      ],
      "title": "listmount: don\u0027t call path_put() under namespace semaphore",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40203",
    "datePublished": "2025-11-12T21:56:34.801Z",
    "dateReserved": "2025-04-16T07:20:57.179Z",
    "dateUpdated": "2026-08-05T12:08:32.046Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-40203",
      "date": "2026-09-17",
      "epss": "0.00141",
      "percentile": "0.03785"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-40203\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-11-12T22:15:47.530\",\"lastModified\":\"2026-07-30T06:24:17.453\",\"vulnStatus\":\"Deferred\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nlistmount: don\u0027t call path_put() under namespace semaphore\\n\\nMassage listmount() and make sure we don\u0027t call path_put() under the\\nnamespace semaphore. If we put the last reference we\u0027re fscked.\"}],\"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\":\"b4c2bea8ceaa50cd42a8f73667389d801a3ecf2d\",\"lessThan\":\"659874b7ee4976ad9ce476e07fd36bc67b3537f1\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"b4c2bea8ceaa50cd42a8f73667389d801a3ecf2d\",\"lessThan\":\"9c80da26fda2fdcaac7f92b5908875b3108830ff\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"b4c2bea8ceaa50cd42a8f73667389d801a3ecf2d\",\"lessThan\":\"c1f86d0ac322c7e77f6f8dbd216c65d39358ffc0\",\"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\":\"6.8\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.8\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.54\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.17.4\",\"lessThanOrEqual\":\"6.17.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.18\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/659874b7ee4976ad9ce476e07fd36bc67b3537f1\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9c80da26fda2fdcaac7f92b5908875b3108830ff\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c1f86d0ac322c7e77f6f8dbd216c65d39358ffc0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-07-30T08:47:46+00:00",
      "cve": "CVE-2025-40203",
      "id": "CVE-2025-40203",
      "initial_release_date": "2025-11-12T00:00:00+00:00",
      "product_status:known_affected": "90",
      "product_status:known_not_affected": "184",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: listmount: don\u0027t call path_put() under namespace semaphore",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40203.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

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.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

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.


Loading…