{"id":"CVE-2025-38711","aliases":["CVE-2025-38711"],"related":[],"kind":"vulnerability","state":"published","title":"smb/server: avoid deadlock when linking with ReplaceIfExists","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb/server: avoid deadlock when linking with ReplaceIfExists\n\nIf smb2_create_link() is called with ReplaceIfExists set and the name\ndoes exist then a deadlock will happen.\n\nksmbd_vfs_kern_path_locked() will return with success and the parent\ndirectory will be locked.  ksmbd_vfs_remove_file() will then remove the\nfile.  ksmbd_vfs_link() will then be called while the parent is still\nlocked.  It will try to lock the same parent and will deadlock.\n\nThis patch moves the ksmbd_vfs_kern_path_unlock() call to *before*\nksmbd_vfs_link() and then simplifies the code, removing the file_present\nflag variable.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb/server: avoid deadlock when linking with ReplaceIfExists\n\nIf smb2_create_link() is called with ReplaceIfExists set and the name\ndoes exist then a deadlock will happen.\n\nksmbd_vfs_kern_path_locked() will return with success and the parent\ndirectory will be locked.  ksmbd_vfs_remove_file() will then remove the\nfile.  ksmbd_vfs_link() will then be called while the parent is still\nlocked.  It will try to lock the same parent and will deadlock.\n\nThis patch moves the ksmbd_vfs_kern_path_unlock() call to *before*\nksmbd_vfs_link() and then simplifies the code, removing the file_present\nflag variable.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nsmb/server: evitar interbloqueo al enlazar con ReplaceIfExists\n\nSi se llama a smb2_create_link() con ReplaceIfExists establecido y el nombre existe, entonces ocurrirá un interbloqueo.\n\nksmbd_vfs_kern_path_locked() regresará con éxito y el directorio padre estará bloqueado. ksmbd_vfs_remove_file() entonces eliminará el archivo. ksmbd_vfs_link() entonces será llamado mientras el padre aún esté bloqueado. Intentará bloquear el mismo padre y se interbloqueará.\n\nEste parche mueve la llamada a ksmbd_vfs_kern_path_unlock() a *antes* de ksmbd_vfs_link() y luego simplifica el código, eliminando la variable de bandera file_present.","source":"nvd"}],"published":"2025-09-04T15:33:01.367Z","modified":"2026-10-19T21:10:00.160Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf","fixed":"9d5012ffe14120f978ee34aef4df3d6cb026b7c4","status":"affected"},{"type":"git","introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf","fixed":"ac98d54630d5b52e3f684d872f0d82c06c418ea9","status":"affected"},{"type":"git","introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf","fixed":"1e858a7a51c7b8b009d8f246de7ceb7743b44a71","status":"affected"},{"type":"git","introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf","fixed":"814cfdb6358d9b84fcbec9918c8f938cc096a43a","status":"affected"},{"type":"git","introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf","fixed":"a7dddd62578c2eb6cb28b8835556a121b5157323","status":"affected"},{"type":"git","introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf","fixed":"a726fef6d7d4cfc365d3434e3916dbfe78991a33","status":"affected"},{"type":"git","introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf","fixed":"d5fc1400a34b4ea5e8f2ce296ea12bf8c8421694","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.15","status":"unaffected"},{"type":"semver","introduced":"5.15.190","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.149","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.103","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.43","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.11","lastAffected":"6.15.*","status":"unaffected"},{"type":"semver","introduced":"6.16.2","lastAffected":"6.16.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.17","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.15","fixed":"5.15.190"},{"status":"affected","introduced":"5.16","fixed":"6.1.149"},{"status":"affected","introduced":"6.2","fixed":"6.6.103"},{"status":"affected","introduced":"6.7","fixed":"6.12.43"},{"status":"affected","introduced":"6.13","fixed":"6.15.11"},{"status":"affected","introduced":"6.16","fixed":"6.16.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/9d5012ffe14120f978ee34aef4df3d6cb026b7c4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ac98d54630d5b52e3f684d872f0d82c06c418ea9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1e858a7a51c7b8b009d8f246de7ceb7743b44a71","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/814cfdb6358d9b84fcbec9918c8f938cc096a43a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a7dddd62578c2eb6cb28b8835556a121b5157323","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a726fef6d7d4cfc365d3434e3916dbfe78991a33","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d5fc1400a34b4ea5e8f2ce296ea12bf8c8421694","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["mailing-list","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-032379.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38711","url":"https://www.cve.org/CVERecord?id=CVE-2025-38711","licence":"CVE Terms of Use","modified":"2026-05-12T12:05:45.767Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38711","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38711","licence":"Public domain","modified":"2026-10-19T21:10:00.160Z"}],"updatedAt":"2026-11-25T22:59:04.152Z","epss":{"score":0.00135,"percentile":0.03215,"date":"2026-12-01T12:00:22.000Z"}}