{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-21737","id":"CVE-2025-21737","title":"ceph: fix memory leak in ceph_mds_auth_match()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nceph: fix memory leak in ceph_mds_auth_match()\n\nWe now free the temporary target path substring allocation on every\npossible branch, instead of omitting the default branch.  In some\ncases, a memory leak occured, which could rapidly crash the system\n(depending on how many file accesses were attempted).\n\nThis was detected in produc","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nceph: fix memory leak in ceph_mds_auth_match()\n\nWe now free the temporary target path substring allocation on every\npossible branch, instead of omitting the default branch.  In some\ncases, a memory leak occured, which could rapidly crash the system\n(depending on how many file accesses were attempted).\n\nThis was detected in production because it caused a continuous memory\ngrowth, eventually triggering kernel OOM and completely hard-locking\nthe kernel.\n\nRelevant kmemleak stacktrace:\n\n    unreferenced object 0xffff888131e69900 (size 128):\n      comm \"git\", pid 66104, jiffies 4295435999\n      hex dump (first 32 bytes):\n        76 6f 6c 75 6d 65 73 2f 63 6f 6e 74 61 69 6e 65  volumes/containe\n        72 73 2f 67 69 74 65 61 2f 67 69 74 65 61 2f 67  rs/gitea/gitea/g\n      backtrace (crc 2f3bb450):\n        [<ffffffffaa68fb49>] __kmalloc_noprof+0x359/0x510\n        [<ffffffffc32bf1df>] ceph_mds_check_access+0x5bf/0x14e0 [ceph]\n        [<ffffffffc3235722>] ceph_open+0x312/0xd80 [ceph]\n        [<ffffffffaa7dd786>] do_dentry_open+0x456/0x1120\n        [<ffffffffaa7e3729>] vfs_open+0x79/0x360\n        [<ffffffffaa832875>] path_openat+0x1de5/0x4390\n        [<ffffffffaa834fcc>] do_filp_open+0x19c/0x3c0\n        [<ffffffffaa7e44a1>] do_sys_openat2+0x141/0x180\n        [<ffffffffaa7e4945>] __x64_sys_open+0xe5/0x1a0\n        [<ffffffffac2cc2f7>] do_syscall_64+0xb7/0x210\n        [<ffffffffac400130>] entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\nIt can be triggered by mouting a subdirectory of a CephFS filesystem,\nand then trying to access files on this subdirectory with an auth token\nusing a path-scoped capability:\n\n    $ ceph auth get client.services\n    [client.services]\n            key = REDACTED\n            caps mds = \"allow rw fsname=cephfs path=/volumes/\"\n            caps mon = \"allow r fsname=cephfs\"\n            caps osd = \"allow rw tag cephfs data=cephfs\"\n\n    $ cat /proc/self/mounts\n    services@[REDACTED].cephfs=/volumes/containers /ceph/containers ceph rw,noatime,name=services,secret=<hidden>,ms_mode=prefer-crc,mount_timeout=300,acl,mon_addr=[REDACTED]:3300,recover_session=clean 0 0\n\n    $ seq 1 1000000 | xargs -P32 --replace={} touch /ceph/containers/file-{} && \\\n    seq 1 1000000 | xargs -P32 --replace={} cat /ceph/containers/file-{}\n\n[ idryomov: combine if statements, rename rc to path_matched and make\n            it a bool, formatting ]","published":"2025-02-27T02:12:13.434Z","updated":"2026-10-28T02:30:33.980807978Z","reserved":"2024-12-29T08:45:45.756Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"CISA-ADP"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"OSV"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"596afb0b8933ba6ed7227adcc538db26feb25c74","lessThan":"146109fe936ac07f8f60cd6267543688985b96bc","status":"affected","versionType":"git"},{"version":"596afb0b8933ba6ed7227adcc538db26feb25c74","lessThan":"2b6086c5efe5c7bd6e0eb440d96c26ca0d20d9d7","status":"affected","versionType":"git"},{"version":"596afb0b8933ba6ed7227adcc538db26feb25c74","lessThan":"3b7d93db450e9d8ead80d75e2a303248f1528c35","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.10","status":"affected"},{"version":"0","lessThan":"6.10","status":"unaffected","versionType":"semver"},{"version":"6.12.14","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.13.3","lessThanOrEqual":"6.13.*","status":"unaffected","versionType":"semver"},{"version":"6.14","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-401"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/146109fe936ac07f8f60cd6267543688985b96bc","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/2b6086c5efe5c7bd6e0eb440d96c26ca0d20d9d7","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/3b7d93db450e9d8ead80d75e2a303248f1528c35","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21737.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21737","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00208,"epssPercentile":0.11005,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-21737","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21737","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-21737","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-21737","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}