Description
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().
Published: 2026-07-25
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability lies in the ksmbd SMB2 SET_INFO SECURITY handler, which allows a client to re‑perm its own file descriptor by calling SMB2_SET_INFO with the security descriptor type without performing a per‑handle access check. The missing approval of a WRITE_DAC or WRITE_OWNER permission means that a handle opened only with FILE_WRITE_ATTRIBUTES can change the file’s DACL and owner, granting itself rights that should be restricted. This can be used to bypass file permissions and elevate privileges on the target system, directly affecting confidentiality, integrity, and availability for the victim. The weakness is an improper access control flaw that can lead to privilege escalation.

Affected Systems

All Linux kernel builds that include ksmbd but lack the patch introduced by commit cc57232cae23 are affected. The vulnerability exists in kernels prior to the inclusion of the WRITE_DAC/WRITE_OWNER check in the SMB2 SET_INFO SECURITY arm. As the patch is available in the mainline kernel, systems running kernel versions before the commit are at risk.

Risk and Exploitability

The EPSS score for this flaw is reported as less than 1%, indicating a very low probability of active exploitation at this time. It is not listed in the CISA KEV catalog, further suggesting it is not currently a widely exploited vulnerability. However, the flaw can be exploited by an SMB2 client that can open a file with FILE_WRITE_ATTRIBUTES access, a grant that can be easily obtained on an SMB share. The attack vector is local to a network attacker who can speak SMB2 to a ksmbd instance. The potential impact is high, but the likelihood of exploitation is considered low due to the need for SMB2 communication and the absence of a public exploit. The CVSS score is 8.8, indicating the vulnerability is high severity.

Generated by OpenCVE AI on August 3, 2026 at 18:54 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the ksmbd WRITE_DAC/WRITE_OWNER access check (commit cc57232cae23).
  • If a kernel upgrade is not possible immediately, configure the ksmbd service or firewalls to block the SMB2_SET_INFO SECURITY operation or disable ksmbd support for security descriptor updates.
  • Adjust SMB share permissions to deny FILE_WRITE_ATTRIBUTES to clients lacking FILE_WRITE_DAC or FILE_WRITE_OWNER rights, ensuring that only authorized clients can alter file ownership or ACLs.

Generated by OpenCVE AI on August 3, 2026 at 18:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4720-1 linux security update
Debian DLA Debian DLA DLA-4723-1 linux-6.1 security update
Debian DLA Debian DLA DLA-4724-1 linux-6.12 new package
History

Sun, 02 Aug 2026 13:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-284

Wed, 29 Jul 2026 12:15:00 +0000


Tue, 28 Jul 2026 16:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-284

Mon, 27 Jul 2026 05:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Sat, 25 Jul 2026 09:30:00 +0000

Type Values Removed Values Added
Description 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().
Title ksmbd: add a WRITE_DAC/WRITE_OWNER check to SMB2 SET_INFO SECURITY
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-05T12:41:31.580Z

Reserved: 2026-07-19T15:36:31.785Z

Link: CVE-2026-64394

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-07-25T10:17:22.790

Modified: 2026-08-11T15:01:50.637

Link: CVE-2026-64394

cve-icon Redhat

Severity :

Publid Date: 2026-07-25T00:00:00Z

Links: CVE-2026-64394 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T19:00:05Z

Weaknesses
  • CWE-266

    Incorrect Privilege Assignment