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

ksmbd: add a permission check for FSCTL_SET_ZERO_DATA

FSCTL_SET_ZERO_DATA in smb2_ioctl() destroys file data via
ksmbd_vfs_zero_data() -> vfs_fallocate(PUNCH_HOLE/ZERO_RANGE) after
checking only the share-level KSMBD_TREE_CONN_FLAG_WRITABLE, with no
per-handle access check. A handle opened with only FILE_WRITE_ATTRIBUTES
still yields an FMODE_WRITE filp (FILE_WRITE_ATTRIBUTES is part of
FILE_WRITE_DESIRE_ACCESS_LE, so smb2_create_open_flags() opens it
O_WRONLY), so the vfs_fallocate FMODE_WRITE check does not stop it; only
the missing fp->daccess gate would. Reproduced on mainline 7.1-rc7 with
KASAN by an authenticated SMB client: a FILE_WRITE_ATTRIBUTES-only handle
zeroed 4096 bytes of file data it had no FILE_WRITE_DATA right to
(6/6; a FILE_READ_DATA-only handle was correctly denied).

This is the unfixed sibling of commit cc57232cae23 ("ksmbd: fix FSCTL
permission bypass by adding a permission check for FSCTL_SET_SPARSE").
Because SET_ZERO_DATA writes data (not an attribute), require
FILE_WRITE_DATA.
Published: 2026-07-25
Score: 8.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

An authenticated SMB client can send the FSCTL_SET_ZERO_DATA command to the ksmbd SMB server in the Linux kernel. The kernel implementation performs a share‑level writable check but does not enforce a per‑handle FILE_WRITE_DATA permission. Consequently a handle opened with only FILE_WRITE_ATTRIBUTES rights, which still grants a writable file descriptor, permits the underlying vfs_fallocate call to zero out arbitrary portions of a file. The flaw therefore allows a malicious client to permanently erase file data without the required write‑data privilege, resulting in data loss.

Affected Systems

All Linux kernels that include the ksmbd SMB server component but lack the commit adding the permission check for FSCTL_SET_ZERO_DATA are vulnerable. The issue was demonstrated against mainline 7.1‑rc7 and applies to any kernel build that has not applied the relevant patch. Distribution kernels that incorporate the ksmbd module and have not updated to the fixed version remain at risk.

Risk and Exploitability

The vulnerability has a CVSS score of 8.1, indicating a high impact. Its EPSS score is less than 1% and it is not listed in the CISA KEV catalog, which suggests that exploitation is currently unlikely to be widespread. The attack requires only an authenticated SMB client; no local privileges are necessary. Once exploited, a single malicious FSCTL_SET_ZERO_DATA request can permanently erase data from any file that the compromised user has write‑attribute rights. The risk is therefore high until the kernel is updated to a version that includes the permission check.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply a Linux kernel update that includes the commit adding the permission check for FSCTL_SET_ZERO_DATA
  • If a kernel update cannot be performed immediately, restrict SMB share permissions to forbid FILE_WRITE_ATTRIBUTES rights for untrusted users, thereby limiting the attack surface
  • Enable kernel audit logging for FSCTL_SET_ZERO_DATA operations to detect unauthorized usage and generate alerts

Generated by OpenCVE AI on August 3, 2026 at 18:52 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

Sat, 01 Aug 2026 02:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-284

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


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

Type Values Removed Values Added
Metrics cvssV3_1

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


Sun, 26 Jul 2026 02:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-284

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 permission check for FSCTL_SET_ZERO_DATA FSCTL_SET_ZERO_DATA in smb2_ioctl() destroys file data via ksmbd_vfs_zero_data() -> vfs_fallocate(PUNCH_HOLE/ZERO_RANGE) after checking only the share-level KSMBD_TREE_CONN_FLAG_WRITABLE, with no per-handle access check. A handle opened with only FILE_WRITE_ATTRIBUTES still yields an FMODE_WRITE filp (FILE_WRITE_ATTRIBUTES is part of FILE_WRITE_DESIRE_ACCESS_LE, so smb2_create_open_flags() opens it O_WRONLY), so the vfs_fallocate FMODE_WRITE check does not stop it; only the missing fp->daccess gate would. Reproduced on mainline 7.1-rc7 with KASAN by an authenticated SMB client: a FILE_WRITE_ATTRIBUTES-only handle zeroed 4096 bytes of file data it had no FILE_WRITE_DATA right to (6/6; a FILE_READ_DATA-only handle was correctly denied). This is the unfixed sibling of commit cc57232cae23 ("ksmbd: fix FSCTL permission bypass by adding a permission check for FSCTL_SET_SPARSE"). Because SET_ZERO_DATA writes data (not an attribute), require FILE_WRITE_DATA.
Title ksmbd: add a permission check for FSCTL_SET_ZERO_DATA
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:36.210Z

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

Link: CVE-2026-64398

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

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

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

Link: CVE-2026-64398

cve-icon Redhat

Severity :

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

Links: CVE-2026-64398 - Bugzilla

cve-icon OpenCVE Enrichment

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

Weaknesses
  • CWE-266

    Incorrect Privilege Assignment