Re: [PATCH v3 0/2] smb: client: fix out-of-bounds reads in CIFSSMBRead()
From: Paulo Alcantara
Date: Wed Sep 02 2026 - 16:27:12 EST
Diego Oliva <diego@xxxxxxxx> writes:
> CIFSSMBRead() parses the server's READ_RSP without validating either
> the length of the response or the DataOffset it carries. A malicious
> or compromised SMB1 server can exploit either to read past the end of
> the receive buffer, leaking adjacent kernel heap into the caller's
> read buffer or oopsing on unmapped memory. SMB1 is not negotiated by
> default; reaching this code requires an explicit vers=1.0 mount.
>
> Patch 1 rejects responses too short to contain a whole READ_RSP, so
> the header fields can be dereferenced safely. Patch 2 ejects a
> DataOffset/DataLength pair that falls outside the received response.
> ....
Applied.