Re: [PATCH] ksmbd: refuse to read a handle that is not open for reading

From: Ian Bridges

Date: Thu Nov 05 2026 - 16:26:42 EST


On Thu, Nov 05, 2026 at 11:08:38PM +0530, Wahid Khan wrote:
> Return STATUS_ACCESS_DENIED when the file is not readable.

Tested on ksmbd-for-next with KASAN. A READ on a handle opened for
FILE_WRITE_DATA | FILE_EXECUTE | FILE_READ_ATTRIBUTES hits the warning
before and gets STATUS_ACCESS_DENIED after. smbtorture gives the same
results as without the patch.

Reviewed-by: Ian Bridges <icb@xxxxxxxxxxxx>
Tested-by: Ian Bridges <icb@xxxxxxxxxxxx>