ksmbd: add a permission check for FSCTL_SET_ZERO_DATA
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Linux | Linux | 5.15 and later | 6.1.178, 6.6.145, 6.12.96, 6.18.39, 7.1.4, 7.2 | Patch available | CNA |
- Linux VendorLinux Affected 5.15 and later Fixed in 6.1.178, 6.6.145, 6.12.96, 6.18.39, 7.1.4, 7.2 Patch available CNA
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.15 to before 6.1.178; 6.2 to before 6.6.145; 6.7 to before 6.12.96; 6.13 to before 6.18.39; 6.19 to before 7.1.4 | Vulnerable | Linux |
- cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* Versions 5.15 to before 6.1.178; 6.2 to before 6.6.145; 6.7 to before 6.12.96; 6.13 to before 6.18.39; 6.19 to before 7.1.4 Vulnerable ·Linux
Remediation
- Fix · CNA Linux (Linux) Fixed in 6.1.178, 6.6.145, 6.12.96, 6.18.39, 7.1.4, 7.2
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
Not affected: 5 products
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2026-64398
- 2026-10-03 Alias added: GHSA-ch49-xqcg-99vv
- 2026-10-13 Affected versions changed · Red Hat
- 2026-10-14 EPSS moved to the below the 50th percentile
- 2026-10-20 Affected versions changed · Red Hat
References
Patch 6
- https://git.kernel.org/stable/c/25377f369688dd0bd814dc8965ed26d44238ecaa
- https://git.kernel.org/stable/c/3072d82461f498c85daea8766e9d8bfbada31605
- https://git.kernel.org/stable/c/ca53bb17f4e8232cfaece3953d3cef62c559b039
- https://git.kernel.org/stable/c/57f2042fd87d7ce8fc3ac8b6c176e554df68b1a7
- https://git.kernel.org/stable/c/deffa929086d7902e30918adf3dd27ccfe9c08b1
- https://git.kernel.org/stable/c/3320ba068198adc144c89d6661b805acce01735b
More Linux Kernel vulnerabilities
- TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
- TI-2021-05514 Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACE KEVCVSS 3.1HIGH 8.3
Sources
- CVE-2026-64398 · CVE Program
- CVE-2026-64398 · NVD
- FIRST EPSS
- GHSA-ch49-xqcg-99vv · GitHub Advisory Database · CC BY 4.0
- CVE-2026-64398 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences