Re: [PATCH] smb: client: handle zero DataOffset in CIFSSMBRead()
From: Paulo Alcantara
Date: Tue Dec 01 2026 - 16:08:26 EST
Mark Bundschuh <mkbund@xxxxxxxxxx> writes:
> commit 5be5bdda5863 ("smb: client: reject out-of-bounds DataOffset in
> CIFSSMBRead()") rejects any reply whose DataOffset points inside the
> READ_ANDX header, including a DataOffset of 0. Windows sends a DataOffset
> of 0 for a read at or beyond EOF, which cifs_readv_receive() and
> SMB2_read() both accept by treating the data as starting right after the
> header.
>
> Handle it the same way in CIFSSMBRead() rather than rejecting it, and
> keep the check that DataOffset + DataLength lies within the received
> response.
> ...
Applied.