In the Linux kernel, the following vulnerability has been resolved:
smb/server: avoid deadlock when linking with ReplaceIfExists
If smb2createlink() is called with ReplaceIfExists set and the name does exist then a deadlock will happen.
ksmbdvfskernpathlocked() will return with success and the parent directory will be locked. ksmbdvfsremovefile() will then remove the file. ksmbdvfs_link() will then be called while the parent is still locked. It will try to lock the same parent and will deadlock.
This patch moves the ksmbdvfskernpathunlock() call to before ksmbdvfslink() and then simplifies the code, removing the file_present flag variable.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/blob/9c3874e559580d6c6ec8d449812ac11277724770/cves/2025/38xxx/CVE-2025-38711.json",
"cna_assigner": "Linux"
}