CVE-2026-64394 in Linuxinfo

Summary

by MITRE • 07/25/2026

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

ksmbd: add a WRITE_DAC/WRITE_OWNER check to SMB2 SET_INFO SECURITY

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

set_info_sec() (fs/smb/server/smbacl.c) re-permissions the file: it rewrites owner/group/mode via notify_change(), rewrites the POSIX ACL via set_posix_acl(), and on KSMBD_SHARE_FLAG_ACL_XATTR shares removes and rewrites the Windows security descriptor via ksmbd_vfs_set_sd_xattr(). Every other persistent-mutation arm of the sibling handler smb2_set_info_file() checks fp->daccess first (FILE_WRITE_DATA / FILE_DELETE / FILE_WRITE_EA / FILE_WRITE_ATTRIBUTES); the SECURITY arm — which mutates the access control itself — is the only one with no gate.

A client can therefore open a handle with FILE_WRITE_ATTRIBUTES only (no FILE_WRITE_DAC / FILE_WRITE_OWNER) and use SMB2_SET_INFO with InfoType SMB2_O_INFO_SECURITY 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 FMODE_WRITE VFS backstop — the missing fp->daccess check is the entire gate.

Setting a security descriptor is the WRITE_DAC / WRITE_OWNER operation, so require at least one of those on the handle before re-permissioning the file. -EACCES is mapped to STATUS_ACCESS_DENIED by smb2_set_info().

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 07/25/2026

The vulnerability described represents a critical access control flaw in the Linux kernel's ksmbd implementation that enables privilege escalation through improper permission validation during SMB2 security information modification operations. This issue specifically affects the SMB2 SET_INFO SECURITY functionality where the kernel fails to validate handle-level permissions before allowing modification of file security descriptors. The vulnerability stems from an incomplete implementation of access control checks that were previously addressed in other parts of the codebase but were overlooked in this particular security mutation handler.

The technical flaw manifests in the smb2_set_info_sec() function which directly calls set_info_sec() without performing the required fp->daccess validation that exists in other similar operations within the same subsystem. This function performs multiple security-relevant operations including rewriting ownership and group permissions via notify_change(), modifying POSIX ACLs through set_posix_acl(), and managing Windows security descriptors on ACL_XATTR shares via ksmbd_vfs_set_sd_xattr(). Unlike other mutation arms of smb2_set_info_file() that properly validate handle permissions using FILE_WRITE_DATA, FILE_DELETE, FILE_WRITE_EA, or FILE_WRITE_ATTRIBUTES flags, the SECURITY arm completely bypasses this critical access validation step.

This vulnerability creates a significant operational impact by allowing unauthorized access to file security controls through specially crafted SMB2 requests. An attacker with merely FILE_WRITE_ATTRIBUTES permission on a file can exploit this flaw to modify the Discretionary Access Control List (DACL) and owner information, effectively granting themselves elevated privileges that exceed their original handle permissions. The missing access check represents a complete bypass of the kernel's handle-based access control model, where the security descriptor modification operation is not constrained by the permissions originally granted when the file handle was opened. This particular flaw is classified as a privilege escalation vulnerability with potential for lateral movement and persistent access within network environments.

The mitigation strategy requires implementing proper handle permission validation before allowing security descriptor modifications, specifically requiring either WRITE_DAC or WRITE_OWNER permissions on the file handle before permitting any security-related mutations. This aligns with standard security practices outlined in the Common Weakness Enumeration (CWE) category CWE-284 for Improper Access Control and follows ATT&CK framework techniques related to privilege escalation through access control bypasses. The solution involves adding a validation check that compares the current handle's daccess permissions against the required WRITE_DAC or WRITE_OWNER flags, returning -EACCES which maps to STATUS_ACCESS_DENIED in the SMB2 protocol layer. This fix ensures that file security modifications remain constrained by the original handle permissions, maintaining proper access control boundaries and preventing unauthorized privilege escalation through SMB2 protocol operations.

The vulnerability demonstrates a pattern of incomplete security implementation common in complex kernel subsystems where access controls are properly enforced in some code paths but missing in others, creating inconsistent security postures. The absence of this check in the SMB2_SET_INFO_SECURITY handler represents a gap that could be exploited for unauthorized file access control modifications, particularly in environments where multiple users access shared resources through SMB protocols and where proper access control enforcement is critical for maintaining data confidentiality and integrity.

Responsible

Linux

Reservation

07/19/2026

Disclosure

07/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00225

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!