ksmbd: use opener credentials for FSCTL mutations
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 · < c6394bcaf254c5baf9aff43376020be5db6d3316| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel's ksmbd component uses worker credentials instead of the credentials captured when an SMB file handle was opened for SET_SPARSE, SET_ZERO_DATA and SET_COMPRESSION. An attacker operating through an open SMB handle may cause file mutations to be checked against the wrong credentials, including inode permissions, ownership and LSM policy. The input does not specify authentication requirements.
Engineers running Linux kernels with ksmbd should check their exposure; affected versions are not specified.