summaryrefslogtreecommitdiff
path: root/security/lockdown
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2024-08-15 18:31:36 -0500
committerSteve French <stfrench@microsoft.com>2024-08-18 17:01:06 -0500
commite4be320eeca842a3d7648258ee3673f1755a5a59 (patch)
treeb928c670bf7894fc5391e727e704bec8a9a0e451 /security/lockdown
parent47ac09b91befbb6a235ab620c32af719f8208399 (diff)
downloadlwn-e4be320eeca842a3d7648258ee3673f1755a5a59.tar.gz
lwn-e4be320eeca842a3d7648258ee3673f1755a5a59.zip
smb3: fix broken cached reads when posix locks
Mandatory locking is enforced for cached reads, which violates default posix semantics, and also it is enforced inconsistently. This affected recent versions of libreoffice, and can be demonstrated by opening a file twice from the same client, locking it from handle one and trying to read from it from handle two (which fails, returning EACCES). There is already a mount option "forcemandatorylock" (which defaults to off), so with this change only when the user intentionally specifies "forcemandatorylock" on mount will we break posix semantics on read to a locked range (ie we will only fail in this case, if the user mounts with "forcemandatorylock"). An earlier patch fixed the write path. Fixes: 85160e03a79e ("CIFS: Implement caching mechanism for mandatory brlocks") Cc: stable@vger.kernel.org Cc: Pavel Shilovsky <piastryyy@gmail.com> Reviewed-by: David Howells <dhowells@redhat.com> Reported-by: abartlet@samba.org Reported-by: Kevin Ottens <kevin.ottens@enioka.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'security/lockdown')
0 files changed, 0 insertions, 0 deletions