CVE-2025-38711 smb/server: avoid deadlock when linking with ReplaceIfExists

Medium 5.5 Published Updated

A deadlock in the Linux kernel SMB server allows remote attackers to cause a denial of service by triggering a specific file linking operation.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-38711?

CVE-2025-38711 is a medium-severity vulnerability in Debian Debian Linux, published on 4 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

smb/server: avoid deadlock when linking with ReplaceIfExists

If smb2_create_link() is called with ReplaceIfExists set and the name does exist then a deadlock will happen.

ksmbd_vfs_kern_path_locked() will return with success and the parent directory will be locked. ksmbd_vfs_remove_file() will then remove the file. ksmbd_vfs_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 ksmbd_vfs_kern_path_unlock() call to *before* ksmbd_vfs_link() and then simplifies the code, removing the file_present flag variable.

Weakness: CWE-667

Which versions are affected by CVE-2025-38711?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2025-38711?

Apply the vendor's patch.

Is CVE-2025-38711 being exploited?

There is no known exploitation of CVE-2025-38711 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as AZL-66872, BELL-CVE-2025-38711, DEBIAN-CVE-2025-38711, GHSA-c3j4-c39c-w5r2, ROOT-OS-DEBIAN-11-CVE-2025-38711, ROOT-OS-DEBIAN-12-CVE-2025-38711 and 3 more.

Is CVE-2025-38711 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free