Skip to main content

Linux Kernel ksmbd CVE-2025-68809

CRITICAL
2026-01-13 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Critical
Disputed · 9.1 Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Share

Severity by source

Sources disagree (Medium–Critical)
Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY
9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
vuln.today AI
6.8 MEDIUM

Race requires winning a tight timing window (AC:H) and SMB share access with delete rights (PR:L); no confidentiality impact (C:N), corrupted delete semantics give I:H/A:H.

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE
5.5 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Red Hat
MEDIUM
qualitative

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

Lifecycle Timeline

5
Analysis Updated
Jul 30, 2026 - 06:45 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Jul 30, 2026 - 06:37 vuln.today
cvss_changed
CVSS changed
Jul 30, 2026 - 06:37 NVD
9.1 (CRITICAL)
Analysis Generated
Mar 12, 2026 - 21:54 vuln.today
CVE Published
Jan 13, 2026 - 16:16 nvd
N/A

DescriptionCVE.org

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

ksmbd: vfs: fix race on m_flags in vfs_cache

ksmbd maintains delete-on-close and pending-delete state in ksmbd_inode->m_flags. In vfs_cache.c this field is accessed under inconsistent locking: some paths read and modify m_flags under ci->m_lock while others do so without taking the lock at all.

Examples:

  • ksmbd_query_inode_status() and __ksmbd_inode_close() use

ci->m_lock when checking or updating m_flags.

  • ksmbd_inode_pending_delete(), ksmbd_set_inode_pending_delete(),

ksmbd_clear_inode_pending_delete() and ksmbd_fd_set_delete_on_close() used to read and modify m_flags without ci->m_lock.

This creates a potential data race on m_flags when multiple threads open, close and delete the same file concurrently. In the worst case delete-on-close and pending-delete bits can be lost or observed in an inconsistent state, leading to confusing delete semantics (files that stay on disk after delete-on-close, or files that disappear while still in use).

Fix it by:

  • Making ksmbd_query_inode_status() look at m_flags under ci->m_lock

after dropping inode_hash_lock.

  • Adding ci->m_lock protection to all helpers that read or modify

m_flags (ksmbd_inode_pending_delete(), ksmbd_set_inode_pending_delete(), ksmbd_clear_inode_pending_delete(), ksmbd_fd_set_delete_on_close()).

  • Keeping the existing ci->m_lock protection in __ksmbd_inode_close(),

and moving the actual unlink/xattr removal outside the lock.

This unifies the locking around m_flags and removes the data race while preserving the existing delete-on-close behaviour.

AnalysisAI

Concurrent SMB delete-on-close handling in the Linux kernel's in-kernel SMB3 server (ksmbd) mishandles locking on the ksmbd_inode->m_flags field, letting racing open/close/delete operations corrupt delete-on-close and pending-delete state. Affected builds ship the pre-fix ksmbd vfs_cache code where helpers such as ksmbd_inode_pending_delete() and ksmbd_fd_set_delete_on_close() read and modify m_flags without holding ci->m_lock. The result is inconsistent delete semantics - files that persist after a delete-on-close or vanish while still in use - with no public exploit identified at time of analysis and a very low EPSS score (0.03%).

Technical ContextAI

ksmbd is the Linux kernel's native SMB2/SMB3 file server (an in-kernel alternative to user-space Samba), and vfs_cache.c tracks per-inode server state in a ksmbd_inode structure. The delete-on-close and pending-delete disposition bits live in the m_flags field, which is supposed to be serialized by the per-inode ci->m_lock. The root cause is a classic data race (CWE-362, time-of-check/time-of-use on shared state): some code paths (ksmbd_query_inode_status(), __ksmbd_inode_close()) touched m_flags under the lock while the pending-delete and set-delete-on-close helpers read-modified-wrote the same bitfield with no lock, so bit updates from parallel handler threads could be lost or interleaved. The fix unifies all m_flags access under ci->m_lock and moves the actual unlink/xattr removal outside the lock. Note the input CWE is listed as N/A; the race-condition classification is inferred from the description.

Affected ProductsAI

The vulnerability affects the Linux kernel's ksmbd subsystem (vfs_cache) in versions prior to the stable trees carrying the fix commits 5adad9727a815c26013b0d41cfee92ffa7d4037c, 991f8a79db99b14c48d20d2052c82d65b9186cad, ccc78781041589ea383e61d5d7a1e9a31b210b93, and ee63729760f5b61a66f345c54dc4c7514e62383d (git.kernel.org/stable). Only systems that have the CONFIG_SMB_SERVER (ksmbd) module built and actively serving SMB shares are exposed. Ubuntu tracks the issue under USN-8177-1 (https://ubuntu.com/security/notices/USN-8177-1), and VulDB carries advisory https://vuldb.com/?id.340683. Exact vulnerable-to-fixed version boundaries depend on each distribution's kernel, since the fix was backported across multiple stable branches; consult the distro advisory for the precise fixed package version.

RemediationAI

Upstream fix available (multiple stable commits); the released patched version is distribution-specific and should be taken from your vendor. Apply the kernel update that includes stable commits 5adad97, 991f8a7, ccc7878, and ee63729 - for Ubuntu, install the kernel package fixed per USN-8177-1 (https://ubuntu.com/security/notices/USN-8177-1) and reboot. If you cannot patch immediately, the most effective compensating control is to disable the in-kernel SMB server entirely (stop/unload the ksmbd service and module, e.g. remove the ksmbd module and disable the ksmbd.service/userspace daemon), since the race is only reachable when ksmbd is serving shares; the trade-off is loss of SMB file-sharing via ksmbd, which can be substituted with user-space Samba if sharing is required. Where ksmbd must remain enabled, restrict share access to trusted, authenticated clients and block SMB ports (TCP 445) at the network edge to shrink the attacker population; this limits, but does not eliminate, the race for authorized users.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 16.0 Not-Affected

Share

CVE-2025-68809 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy