diff options
| author | Ian Bridges <icb@fastmail.org> | 2026-11-12 12:36:07 -0600 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-11-15 10:08:13 +0900 |
| commit | fecd3599f21255553989b4a4303de77ec05ac556 (patch) | |
| tree | 64a50fc6f5cf084efe7b660d7d5408a853d29e7b /tools/lib/python | |
| parent | 3d322b98b56628ee69e4528a52cc1f445880fa17 (diff) | |
ksmbd: ignore the allocation size create context on a read-only share
On a read-only share, ksmbd refuses writes over SMB, even from a user
whose account could write the files in the underlying filesystem. Such
a user can still open an existing file for write on the share, but the
WRITE requests that follow are refused.
If the open carries an SMB2_CREATE_ALLOCATION_SIZE create context,
smb2_open() still calls vfs_fallocate() on the file, and the filesystem
allows it because of the user's write permission. The user can thereby
reserve any amount of disk space through the read-only share, up to
filling the filesystem. The file's size and data do not change.
Ignore the context on read-only shares. It requests space for a file
being created or overwritten, and such a share permits neither.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Cc: stable@vger.kernel.org
Signed-off-by: Ian Bridges <icb@fastmail.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
