{"id":"CVE-2025-40328","aliases":["CVE-2025-40328"],"related":[],"kind":"vulnerability","state":"published","title":"smb: client: fix potential UAF in smb2_close_cached_fid()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix potential UAF in smb2_close_cached_fid()\n\nfind_or_create_cached_dir() could grab a new reference after kref_put()\nhad seen the refcount drop to zero but before cfid_list_lock is acquired\nin smb2_close_cached_fid(), leading to use-after-free.\n\nSwitch to kref_put_lock() so cfid_release() is called with\ncfid_list_lock held, closing that gap.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix potential UAF in smb2_close_cached_fid()\n\nfind_or_create_cached_dir() could grab a new reference after kref_put()\nhad seen the refcount drop to zero but before cfid_list_lock is acquired\nin smb2_close_cached_fid(), leading to use-after-free.\n\nSwitch to kref_put_lock() so cfid_release() is called with\ncfid_list_lock held, closing that gap.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nsmb: cliente: corregir un potencial uso después de liberación en smb2_close_cached_fid()\n\nfind_or_create_cached_dir() podría obtener una nueva referencia después de que kref_put() hubiera visto que el contador de referencias caía a cero, pero antes de que se adquiera cfid_list_lock en smb2_close_cached_fid(), lo que lleva a un uso después de liberación.\n\nCambiar a kref_put_lock() para que cfid_release() sea llamada con cfid_list_lock retenido, cerrando esa brecha.","source":"nvd"}],"published":"2025-12-09T04:09:44.876Z","modified":"2026-10-30T13:18:16.147Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"ebe98f1447bbccf8228335c62d86af02a0ed23f7","fixed":"bb3355ce9dcaba1b4a766f98b2ad373cab6cd626","status":"affected"},{"type":"git","introduced":"ebe98f1447bbccf8228335c62d86af02a0ed23f7","fixed":"cb52d9c86d70298de0ab7c7953653898cbc0efd6","status":"affected"},{"type":"git","introduced":"ebe98f1447bbccf8228335c62d86af02a0ed23f7","fixed":"065bd62412271a2d734810dd50336cae88c54427","status":"affected"},{"type":"git","introduced":"ebe98f1447bbccf8228335c62d86af02a0ed23f7","fixed":"bdb596ceb4b7c3f28786a33840263728217fbcf5","status":"affected"},{"type":"git","introduced":"ebe98f1447bbccf8228335c62d86af02a0ed23f7","fixed":"734e99623c5b65bf2c03e35978a0b980ebc3c2f8","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.1","status":"unaffected"},{"type":"semver","introduced":"6.1.191","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.117","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.58","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.17.8","lastAffected":"6.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.18","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/bb3355ce9dcaba1b4a766f98b2ad373cab6cd626","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cb52d9c86d70298de0ab7c7953653898cbc0efd6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/065bd62412271a2d734810dd50336cae88c54427","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bdb596ceb4b7c3f28786a33840263728217fbcf5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/734e99623c5b65bf2c03e35978a0b980ebc3c2f8","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-15T21:59:26.611Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-40328","url":"https://www.cve.org/CVERecord?id=CVE-2025-40328","licence":"CVE Terms of Use","modified":"2026-10-30T12:23:02.073Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-40328","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40328","licence":"Public domain","modified":"2026-10-30T13:18:16.147Z"}],"updatedAt":"2026-11-25T22:59:08.472Z","epss":{"score":0.00494,"percentile":0.44002,"date":"2026-12-02T12:00:21.000Z"}}