CVE-2025-68809

Source
https://cve.org/CVERecord?id=CVE-2025-68809
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-68809.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-68809
Downstream
Related
Published
2026-01-13T15:29:15.817Z
Modified
2026-03-20T12:46:29.799015Z
Summary
ksmbd: vfs: fix race on m_flags in vfs_cache
Details

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

ksmbd: vfs: fix race on mflags in vfscache

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

Examples:

  • ksmbdqueryinode_status() and __ksmbdinodeclose() use ci->mlock when checking or updating mflags.
  • ksmbdinodependingdelete(), ksmbdsetinodependingdelete(), ksmbdclearinodependingdelete() and ksmbdfdsetdeleteonclose() used to read and modify mflags without ci->mlock.

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 ksmbdqueryinodestatus() look at mflags under ci->mlock after dropping inodehash_lock.
  • Adding ci->mlock protection to all helpers that read or modify mflags (ksmbdinodependingdelete(), ksmbdsetinodependingdelete(), ksmbdclearinodependingdelete(), ksmbdfdsetdeleteonclose()).
  • Keeping the existing ci->m_lock protection in __ksmbdinodeclose(), 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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68809.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f44158485826c076335d6860d35872271a83791d
Fixed
5adad9727a815c26013b0d41cfee92ffa7d4037c
Fixed
ccc78781041589ea383e61d5d7a1e9a31b210b93
Fixed
ee63729760f5b61a66f345c54dc4c7514e62383d
Fixed
991f8a79db99b14c48d20d2052c82d65b9186cad

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-68809.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.15.0
Fixed
6.6.120
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.64
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.3

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-68809.json"