Re: [PATCH] ksmbd: refuse to write to a handle that is not open for writing
From: Namjae Jeon
Date: Tue Dec 01 2026 - 17:32:23 EST
On Wed, Dec 2, 2026 at 12:03 AM Ian Bridges <icb@xxxxxxxxxxxx> wrote:
>
> I tested this on ksmbd-for-next 87ff512becd4 on x86_64 with KASAN. A
> client opened a character device node and a block device node in a
> share with read and write access and sent a WRITE to each. Without
> the patch the warning above appeared and both WRITEs failed with
> STATUS_INVALID_HANDLE. With the patch both failed with
> STATUS_ACCESS_DENIED and no warning appeared. A WRITE to a FIFO and
> to a regular file still succeeded. smbtorture gives the same results
> as on the base, and KASAN reported nothing.
>
> Reviewed-by: Ian Bridges <icb@xxxxxxxxxxxx>
> Tested-by: Ian Bridges <icb@xxxxxxxxxxxx>
Applied it to #ksmbd-for-next.
Thanks!