CVE-2026-68457 PUBLISHED

ksmbd: use opener credentials for FSCTL mutations

Assigner: Linux
Reserved: 30.07.2026 Published: 15.08.2026 Updated: 17.08.2026

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

ksmbd: use opener credentials for FSCTL mutations

SET_SPARSE, SET_ZERO_DATA and SET_COMPRESSION operate on an open SMB handle but call VFS xattr, fallocate or fileattr helpers with the current ksmbd worker credentials. Those helpers can revalidate inode permissions, ownership and LSM policy independently of the SMB handle access mask.

Run each operation with the credentials captured in the target file when the handle was opened. Keep credential handling local to these single-file FSCTLs rather than applying session credentials to the complete IOCTL handler, which also contains handle-less and multi-handle operations.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
CVSS Score: 9.1

AV:N - The flaw is in ksmbd's SMB2 IOCTL handler, reachable remotely over TCP/445 (or SMB Direct) via smb2_ioctl() processing FSCTL_SET_SPARSE, FSCTL_SET_ZERO_DATA, and FSCTL_SET_COMPRESSION after SMB2 session setup and tree connect. AC:L - An attacker deterministically opens a target file handle and sends the FSCTL; smb2_ioctl() never calls ksmbd_override_fsids(), so VFS helpers always run with privileged worker credentials instead of filp->f_cred, making the bypass reliable without races or external timing. PR:N - Although a valid SMB session, writable tree, and handle with FILE_WRITE_DATA or FILE_WRITE_ATTRIBUTES are required, ksmbd supports passwordless guest sessions on guest-writable shares, so exploitation does not require prior host privileges in a reasonable deployment. UI:N - The attacker directly issues SMB2 IOCTL requests against handles it opened; no separate victim action such as mounting a share, opening a file, or clicking a prompt is required beyond network access to ksmbd. S:U - The credential bypass permits unauthorized file metadata and content mutations within the same host kernel and exported filesystem security authority; it does not cross VM, container, IOMMU, or comparable isolation boundaries. C:N - These FSCTLs only mutate sparse/compression xattrs or zero/punch file ranges via vfs_fallocate and vfs_fileattr helpers; they provide no read primitive, kernel memory disclosure, or alternate unauthorized data exfiltration path. I:H - Privileged ksmbd worker credentials bypass opener UID, group, capability, inode, and LSM revalidation in vfs_fallocate, vfs_fileattr_set, and ksmbd_vfs_set_dos_attrib_xattr, enabling unauthorized sparse/compression attribute changes and arbitrary-range zeroing or hole-punching of protected files. A:H - Repeated FSCTL_SET_ZERO_DATA requests can persistently destroy or corrupt critical exported files and dependent services by zeroing or punching arbitrary ranges with root-equivalent credentials, causing sustained loss of share data and service availability until restoration.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to a8c18434e1f0d9f7989170bdb0490c0160baf065 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to 1e112c47ec5dd1942e2d4ca6e8e9b712238e20c2 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to fb1cae6302d58414ddf029e3f642711bd30243f7 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to e205f3e7e8c31a47cd11efb6cf663a527177e432 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to cfb2c6f71d61ed807c9d7a7af331d406f1f31877 (excl.)
  • affected from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to c6394bcaf254c5baf9aff43376020be5db6d3316 (excl.)
  • affected from 0 to 6.1.178 (excl.)
  • affected from 0 to 6.6.145 (excl.)
  • affected from 0 to 6.12.97 (excl.)
  • affected from 0 to 6.18.40 (excl.)
  • affected from 0 to 7.1.5 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • unaffected from 6.1.178 to 6.1.* (incl.)
  • unaffected from 6.6.145 to 6.6.* (incl.)
  • unaffected from 6.12.97 to 6.12.* (incl.)
  • unaffected from 6.18.40 to 6.18.* (incl.)
  • unaffected from 7.1.5 to 7.1.* (incl.)
  • unaffected from 7.2 to * (incl.)

References