CVE-2025-38660 (GCVE-0-2025-38660)
Vulnerability from cvelistv5
Published
2025-08-22 16:01
Modified
2026-08-05 12:03
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: [ceph] parse_longname(): strrchr() expects NUL-terminated string ... and parse_longname() is not guaranteed that. That's the reason why it uses kmemdup_nul() to build the argument for kstrtou64(); the problem is, kstrtou64() is not the only thing that need it. Just get a NUL-terminated copy of the entire thing and be done with that...
Impacted products
Vendor Product Version
Linux Linux Version: dd66df0053ef84add5e684df517aa9b498342381
Version: dd66df0053ef84add5e684df517aa9b498342381
Version: dd66df0053ef84add5e684df517aa9b498342381
Version: dd66df0053ef84add5e684df517aa9b498342381
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/ceph/crypto.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "bb80f7618832d26f7e395f52f82b1dac76223e5f",
              "status": "affected",
              "version": "dd66df0053ef84add5e684df517aa9b498342381",
              "versionType": "git"
            },
            {
              "lessThan": "3145b2b11492d61c512bbc59660bb823bc757f48",
              "status": "affected",
              "version": "dd66df0053ef84add5e684df517aa9b498342381",
              "versionType": "git"
            },
            {
              "lessThan": "493479af8af3ab907f49e99323777d498a4fbd2b",
              "status": "affected",
              "version": "dd66df0053ef84add5e684df517aa9b498342381",
              "versionType": "git"
            },
            {
              "lessThan": "101841c38346f4ca41dc1802c867da990ffb32eb",
              "status": "affected",
              "version": "dd66df0053ef84add5e684df517aa9b498342381",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/ceph/crypto.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.12.*",
              "status": "unaffected",
              "version": "6.12.42",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.15.*",
              "status": "unaffected",
              "version": "6.15.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.16.*",
              "status": "unaffected",
              "version": "6.16.1",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.17",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.42",
                  "versionStartIncluding": "6.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15.10",
                  "versionStartIncluding": "6.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16.1",
                  "versionStartIncluding": "6.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17",
                  "versionStartIncluding": "6.6",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\n[ceph] parse_longname(): strrchr() expects NUL-terminated string\n\n... and parse_longname() is not guaranteed that.  That\u0027s the reason\nwhy it uses kmemdup_nul() to build the argument for kstrtou64();\nthe problem is, kstrtou64() is not the only thing that need it.\n\nJust get a NUL-terminated copy of the entire thing and be done\nwith that..."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 9.8,
            "baseSeverity": "CRITICAL",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - The unterminated string is dentry-name data read directly out of a Ceph MDS reply message (`info-\u003edname = *p`, `_name = *p`) sitting in the kvmalloc\u0027d `msg-\u003efront` buffer, so a malicious/compromised MDS or an on-path attacker on unencrypted cephfs traffic supplies it remotely. No local caller can produce a non-NUL-terminated name.\nAC:L - The attacker fully controls the reply contents and the exact `front_len`, so they can place the name flush against the end of the allocation and make the overread deterministic; the only build requirement is `CONFIG_FS_ENCRYPTION=y`, which is standard in distro and Android kernels, and no encryption key or encrypted directory is needed since `parse_longname()` runs before those checks.\nPR:N - The attacker holds no account or privilege on the victim client \u2014 the malicious reply is processed by the messenger/MDS-client code with no authorization check on the client side. Any process\u0027s routine directory access on the already-established mount suffices to consume it.\nUI:N - The snapdir condition depends on the server-supplied `snapid`, so a hostile MDS can mark an ordinary directory as `CEPH_SNAPDIR` and trigger the path on any normal readdir or lookup \u2014 no deliberate `.snap` access, remount, or other victim action is required.\nS:U - The out-of-bounds access is confined to kernel memory within the same security authority as the ceph client; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - `strrchr()` reads unbounded adjacent kernel heap until it finds a NUL, and the resulting inflated `*name_len` causes those out-of-bounds bytes to be base64-decoded and propagated into the dentry name handed back toward userspace, giving an unbounded kernel memory disclosure primitive.\nI:H - The corrupted `*name_len` is no longer bounded by the `NAME_MAX` check (which was applied to the pre-parse copy), so `ceph_base64_decode()` and `fscrypt_fname_disk_to_usr()` write far past the end of the `NAME_MAX` fscrypt buffer or the message front buffer, yielding a heap out-of-bounds write with attacker-influenced data.\nA:H - The overread walks off a kvmalloc allocation and can hit a vmalloc guard page or unmapped memory, and the derived oversized length drives a heap overflow \u2014 either produces an oops/panic in the ceph messenger work context, and the attacker can repeat it on every reply."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:03:47.196Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/bb80f7618832d26f7e395f52f82b1dac76223e5f"
        },
        {
          "url": "https://git.kernel.org/stable/c/3145b2b11492d61c512bbc59660bb823bc757f48"
        },
        {
          "url": "https://git.kernel.org/stable/c/493479af8af3ab907f49e99323777d498a4fbd2b"
        },
        {
          "url": "https://git.kernel.org/stable/c/101841c38346f4ca41dc1802c867da990ffb32eb"
        }
      ],
      "title": "[ceph] parse_longname(): strrchr() expects NUL-terminated string",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38660",
    "datePublished": "2025-08-22T16:01:03.686Z",
    "dateReserved": "2025-04-16T04:51:24.031Z",
    "dateUpdated": "2026-08-05T12:03:47.196Z",
    "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…