CVE-2026-52944

ksmbd: fix FSCTL permission bypass by adding a permission check for FSCTL_SET_SPARSE

Published Jun 24, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

ksmbd: fix FSCTL permission bypass by adding a permission check for FSCTL_SET_SPARSE

FSCTL_SET_SPARSE in fsctl_set_sparse() modifies the file's sparse
attribute and saves it through xattr without any permission checks.

This exposes two issues:

1) A client on a read-only share can change the sparse attribute
on files it opened, even though the share is read-only.
Other FSCTL write operations already check
test_tree_conn_flag(work->tcon, KSMBD_TREE_CONN_FLAG_WRITABLE),
but FSCTL_SET_SPARSE does not.

2) Even on writable shares, clients without FILE_WRITE_DATA or
FILE_WRITE_ATTRIBUTES access should not modify the sparse
attribute. Similar handle-level checks exist in other functions
but are missing here.

Add both share-level writable check and per-handle access check.
Use goto out on error to avoid leaking file references.

Analysis

AI-generated

Technical impact

The Linux kernel’s ksmbd server had an omission in its handling of the FSCTL_SET_SPARSE control code: the routine that applies the sparse flag to a file wrote the change to extended attributes without any permission checks. As a result, a SMB client that could send the FSCTL_SET_SPARSE request could alter a file’s sparse attribute even when the share is set to read‑only or when the client does not hold FILE_WRITE_DATA or FILE_WRITE_ATTRIBUTES rights. This flaw enables an attacker to change file metadata and disk usage characteristics without proper authorization, and it is rooted in improper access control (CWE‑266).

Affected Systems

All Linux kernel installations that run the ksmbd SMB server are affected. The flaw is present wherever the unpatched implementation of FSCTL_SET_SPARSE resides, regardless of distribution or specific kernel version, because the patch is made to core ksmbd code used by all enabled SMB services.

Risk and Exploitability

The CVSS score of 5.5 indicates moderate severity, while the EPSS score is below 1%, reflecting a very low probability of exploitation. The vulnerability is not listed in CISA’s KEV catalog. The attack path is straightforward for any SMB client that can send the FSCTL_SET_SPARSE command. As a result, an attacker can modify file attributes without proper authorization, potentially impacting data integrity and system stability.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the ksmbd FSCTL_SET_SPARSE permission‑check patch
  • If an immediate kernel upgrade is not feasible, configure SMB shares to be read‑only or enforce proper FILE_WRITE_DATA/FILE_WRITE_ATTRIBUTES permissions in smb.conf so that only authorized clients can issue write operations
  • Configure or disable SMB support for FSCTL_SET_SPARSE (if the SMB server configuration allows disabling this control code) to prevent clients from attempting to modify sparse attributes

Generated by OpenCVE AI on August 12, 2026 at 05:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4817-1 linux-6.12 security update
Debian DLA Debian DLA DLA-4841-1 linux security update
Debian DSA Debian DSA DSA-6528-1 linux security update
Ubuntu USN Ubuntu USN USN-8566-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8568-1 Linux kernel (OEM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8569-1 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8663-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8664-1 Linux kernel (NVIDIA BaseOS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-3 Linux kernel (Oracle) vulnerabilities
Ubuntu USN Ubuntu USN USN-8903-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8904-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8905-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8906-1 Linux kernel (IBM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8903-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8905-2 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8961-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9002-1 Linux kernel (NVIDIA Tegra) vulnerabilities
Ubuntu USN Ubuntu USN USN-9025-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9029-1 Linux kernel (Raspberry Pi) vulnerabilities
Ubuntu USN Ubuntu USN USN-9066-1 Linux kernel (HWE) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-285
CWE-306
Type Values Removed Values Added
Weaknesses CWE-285
CWE-306
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix FSCTL permission bypass by adding a permission check for FSCTL_SET_SPARSE FSCTL_SET_SPARSE in fsctl_set_sparse() modifies the file's sparse attribute and saves it through xattr without any permission checks. This exposes two issues: 1) A client on a read-only share can change the sparse attribute on files it opened, even though the share is read-only. Other FSCTL write operations already check test_tree_conn_flag(work->tcon, KSMBD_TREE_CONN_FLAG_WRITABLE), but FSCTL_SET_SPARSE does not. 2) Even on writable shares, clients without FILE_WRITE_DATA or FILE_WRITE_ATTRIBUTES access should not modify the sparse attribute. Similar handle-level checks exist in other functions but are missing here. Add both share-level writable check and per-handle access check. Use goto out on error to avoid leaking file references.
Title ksmbd: fix FSCTL permission bypass by adding a permission check for FSCTL_SET_SPARSE
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Sep 14, 2026, 11:58 AM
Reserved
Jun 9, 2026, 7:44 AM
Status
Modified
Published
Jun 24, 2026, 10:17 AM
Modified
Sep 14, 2026, 12:17 PM
Severity
Public date
Jun 24, 2026, 12:00 AM