CVE-2026-98451: smb: client: use finish_no_open() for non-regular inodes
In the Linux kernel, the following vulnerability has been resolved:
smb: client: use finishnoopen() for non-regular inodes
An OCREAT open can find an existing symlink or another non-regular inode. cifsatomicopen() calls finishopen() on it and attaches a cifsFileInfo. Symlink inodes have no CIFS release operation, so the dentry reference held by cifsFileInfo is leaked. FMODEOPENED also prevents the VFS from following the symlink.
Track whether cifsdocreate() returned an open server handle. For non-regular inodes, close the handle if present, remove the pending open, and call finishnoopen() so the VFS can continue the lookup. Do not set FMODECREATED unless a regular file was opened. For ONOFOLLOW with OREGULAR, return -ELOOP before the VFS's -EFTYPE check.
Defer closing a legacy POSIX handle on a non-regular inode until after inode lookup. This avoids closing it again if lookup fails.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.113-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.2.9-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.113-1~deb12u1 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.273 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.224 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.191 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.160 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.113 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.56 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2.9 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Upgrade
Upgrade
azurelinux/kernelto a version that resolves this vulnerability.Fixed in 6.6.161.1-1
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
A Linux SMB/CIFS client must perform an O_CREAT open that resolves to an existing symlink or other non-regular inode. The affected path is in cifs_atomic_open() when handling that existing non-regular object.
What is the observable impact?
The client can attach a cifsFileInfo to a non-regular inode, leaking the dentry reference held by that structure. It can also set FMODE_OPENED, which prevents the VFS from continuing symlink resolution.
How does the fix change behavior for symlinks and other non-regular inodes?
For non-regular inodes, the client closes any server handle that was opened, removes the pending open, and uses finish_no_open() so VFS lookup can continue. It sets FMODE_CREATED only when a regular file was opened.
What happens when O_NOFOLLOW and __O_REGULAR are used?
The corrected behavior returns -ELOOP before the VFS performs its -EFTYPE check.