CVE-2025-37954 (GCVE-0-2025-37954)
Vulnerability from cvelistv5
Published
2025-05-20 16:01
Modified
2026-08-05 11:58
Summary
In the Linux kernel, the following vulnerability has been resolved: smb: client: Avoid race in open_cached_dir with lease breaks A pre-existing valid cfid returned from find_or_create_cached_dir might race with a lease break, meaning open_cached_dir doesn't consider it valid, and thinks it's newly-constructed. This leaks a dentry reference if the allocation occurs before the queued lease break work runs. Avoid the race by extending holding the cfid_list_lock across find_or_create_cached_dir and when the result is checked.
Impacted products
Vendor Product Version
Linux Linux Version: 81ba10959970d15c388bf29866b01b62f387e6a3
Version: 81ba10959970d15c388bf29866b01b62f387e6a3
Version: 81ba10959970d15c388bf29866b01b62f387e6a3
Version: 81ba10959970d15c388bf29866b01b62f387e6a3
Version: 436be190fbf81e5d84040dabf9cb7be06a94dc5d
Version: 6.5.10   
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/client/cached_dir.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "2ed98e89ebc2e1bc73534dc3c18cb7843a889ff9",
              "status": "affected",
              "version": "81ba10959970d15c388bf29866b01b62f387e6a3",
              "versionType": "git"
            },
            {
              "lessThan": "571dcf3d27b24800c171aea7b5e04ff06d10e2e9",
              "status": "affected",
              "version": "81ba10959970d15c388bf29866b01b62f387e6a3",
              "versionType": "git"
            },
            {
              "lessThan": "2407265dc32bc8cc45b62a612c2a214ba9038e8b",
              "status": "affected",
              "version": "81ba10959970d15c388bf29866b01b62f387e6a3",
              "versionType": "git"
            },
            {
              "lessThan": "3ca02e63edccb78ef3659bebc68579c7224a6ca2",
              "status": "affected",
              "version": "81ba10959970d15c388bf29866b01b62f387e6a3",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "436be190fbf81e5d84040dabf9cb7be06a94dc5d",
              "versionType": "git"
            },
            {
              "lessThan": "6.6",
              "status": "affected",
              "version": "6.5.10",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/client/cached_dir.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.6"
            },
            {
              "lessThan": "6.6",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.91",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.29",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.14.*",
              "status": "unaffected",
              "version": "6.14.7",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.15",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.91",
                  "versionStartIncluding": "6.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.29",
                  "versionStartIncluding": "6.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14.7",
                  "versionStartIncluding": "6.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15",
                  "versionStartIncluding": "6.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "6.5.10",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: Avoid race in open_cached_dir with lease breaks\n\nA pre-existing valid cfid returned from find_or_create_cached_dir might\nrace with a lease break, meaning open_cached_dir doesn\u0027t consider it\nvalid, and thinks it\u0027s newly-constructed. This leaks a dentry reference\nif the allocation occurs before the queued lease break work runs.\n\nAvoid the race by extending holding the cfid_list_lock across\nfind_or_create_cached_dir and when the result is checked."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.5,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - The race is driven by an unsolicited SMB2 lease-break packet from the remote server, dispatched straight from the cifs demultiplex thread into cached_dir_lease_break() (fs/smb/client/smb2misc.c:655) with no pending request. A malicious/compromised SMB server, or an off-path attacker injecting frames on an unsigned SMB connection, controls exactly when that half of the race fires.\nAC:L - The attacker controls both sides \u2014 the server chooses when and how often to send lease breaks (unlimited retries, one per re-cached directory), while the client\u0027s routine stat()/getdents() traffic, which the server can itself provoke by breaking leases to force re-opens, repeatedly traverses the unlocked window. The same class of race in this file was reproduced by its author with two ordinary shell loops.\nPR:N - The attacking SMB server holds no privileges or credentials on the victim client; it merely answers a share the client has already mounted. The local half needs nothing beyond stat() or readdir() on the mount, available to any unprivileged account with no capabilities.\nUI:N - The mount is a pre-existing configuration, not an exploit-time action, and no deliberate victim participation is needed \u2014 ordinary background directory access from any process supplies the local half, and the server can force re-opens on demand by breaking the lease.\nS:U - The leaked dentry/inode references, corrupted superblock teardown and crash are all confined to the client kernel\u0027s own security authority. No VM, IOMMU or sandbox boundary is crossed.\nC:N - The defect is a lost reference count; no memory is read out of bounds and no kernel data is copied to the attacker. The only pointer surfaced is in a WARN message, which is %p-hashed and requires dmesg access.\nI:N - The attacker gains no write primitive \u2014 nothing attacker-controlled is stored anywhere, and the cfid kref accounting remains balanced in every interleaving I traced, so no double-free or type confusion is reachable.\nA:H - Each won race permanently leaks a dentry, its inode and an open server handle, and the affected mount can never be torn down: unmount hits WARN(1, \"BUG: Dentry ... still in use\") in umount_check() and then \"VFS: Busy inodes after unmount\", which is a hard BUG()/oops under CONFIG_BUG_ON_DATA_CORRUPTION and a panic under panic_on_warn. Otherwise the superblock is freed with live VFS_PTR_POISON\u0027d inodes that crash on any later access, on top of unbounded, unreclaimable memory growth."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:58:37.074Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/2ed98e89ebc2e1bc73534dc3c18cb7843a889ff9"
        },
        {
          "url": "https://git.kernel.org/stable/c/571dcf3d27b24800c171aea7b5e04ff06d10e2e9"
        },
        {
          "url": "https://git.kernel.org/stable/c/2407265dc32bc8cc45b62a612c2a214ba9038e8b"
        },
        {
          "url": "https://git.kernel.org/stable/c/3ca02e63edccb78ef3659bebc68579c7224a6ca2"
        }
      ],
      "title": "smb: client: Avoid race in open_cached_dir with lease breaks",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-37954",
    "datePublished": "2025-05-20T16:01:48.561Z",
    "dateReserved": "2025-04-16T04:51:23.973Z",
    "dateUpdated": "2026-08-05T11:58:37.074Z",
    "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…