CVE-2026-64394: ksmbd: add a WRITE_DAC/WRITE_OWNER check to SMB2 SET_INFO SECURITY

Published Jul 25, 2026
·
Updated

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

ksmbd: add a WRITEDAC/WRITEOWNER check to SMB2 SETINFO SECURITY

commit cc57232cae23 ("ksmbd: fix FSCTL permission bypass by adding a permission check for FSCTLSETSPARSE") added a fp->daccess gate to fsctlsetsparse and noted that "similar handle-level checks exist in other functions but are missing here." The SMB2 SETINFO SECURITY arm is one of the missing ones, and the most security-relevant: smb2setinfosec() calls setinfosec() with no per-handle access check.

setinfosec() (fs/smb/server/smbacl.c) re-permissions the file: it rewrites owner/group/mode via notifychange(), rewrites the POSIX ACL via setposixacl(), and on KSMBDSHAREFLAGACLXATTR shares removes and rewrites the Windows security descriptor via ksmbdvfssetsdxattr(). Every other persistent-mutation arm of the sibling handler smb2setinfofile() checks fp->daccess first (FILEWRITEDATA / FILEDELETE / FILEWRITEEA / FILEWRITEATTRIBUTES); the SECURITY arm — which mutates the access control itself — is the only one with no gate.

A client can therefore open a handle with FILEWRITEATTRIBUTES only (no FILEWRITEDAC / FILEWRITEOWNER) and use SMB2SETINFO with InfoType SMB2OINFOSECURITY to rewrite the file's DACL and owner, granting itself access the handle's daccess never carried. Unlike the FSCTL data arms this is a metadata/xattr operation, so there is no FMODEWRITE VFS backstop — the missing fp->daccess check is the entire gate.

Setting a security descriptor is the WRITEDAC / WRITEOWNER operation, so require at least one of those on the handle before re-permissioning the file. -EACCES is mapped to STATUSACCESSDENIED by smb2setinfo().

Affected Software

6 affected components
Linux Linux kernel (ksmbd/SMB server)
Linux Linux kernel>=5.15<6.1.178
Linux Linux kernel>=6.2<6.6.145
Linux Linux kernel>=6.7<6.12.96
Linux Linux kernel>=6.13<6.18.39
Linux Linux kernel>=6.19<7.1.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade ksmbd (Linux kernel ksmbd) to a version that resolves this vulnerability.

    Patch commit cc57232cae23
  2. Compensating control

    Limit exposure of SMB2 functionality that could trigger the FSCTL_SET_SPARSE / SMB2 SET_INFO SECURITY permission bypass (e.g., restrict SMB access to trusted clients and networks via firewall/ACL/WAF-like controls), until the kernel fix is applied.

Event History

Jul 25, 2026
CVE Published
via MITRE·08:50 AM
Data Sourced
via MITRE·08:50 AM
DescriptionSeverity
Data Sourced
via NVD·10:17 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What level of access does an attacker need?

An attacker needs network access to the ksmbd SMB service and a handle opened with FILE_WRITE_ATTRIBUTES. The vulnerable path did not require FILE_WRITE_DAC or FILE_WRITE_OWNER on that handle.

2

What changes could be made through the affected operation?

The operation can rewrite file owner, group, and mode, update the POSIX ACL, and, on shares using KSMBD_SHARE_FLAG_ACL_XATTR, remove and rewrite the Windows security descriptor.

3

Are shares using Windows security descriptor xattrs affected differently?

Yes. On KSMBD_SHARE_FLAG_ACL_XATTR shares, the affected operation also removes and rewrites the Windows security descriptor in addition to changing other file permission metadata.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203