]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
smb: client: reject overlapping data areas in SMB2 responses
authorShoichiro Miyamoto <shoichiro.miyamoto@gmail.com>
Sat, 11 Jul 2026 13:33:26 +0000 (22:33 +0900)
committerSteve French <stfrench@microsoft.com>
Mon, 13 Jul 2026 15:37:55 +0000 (10:37 -0500)
commit8986c932905ea508d66da421eb2eb6e676ace1fe
tree2b8621713e5eb411dc145eef84c5132a4b9ddb0d
parent5bd1d3dcc25a51663b3878cbc506e16be15af354
smb: client: reject overlapping data areas in SMB2 responses

Commit 53b7c271f06b ("smb: client: restrict implied bcc[0] exemption to
responses without data area") restricted the implied bcc[0] length
exception to responses without a data area. However, the overlap
handling in __smb2_calc_size() clears data_length, which can make an
invalid response appear to have no data area and so qualify for the
exception.

Track data area overlap separately and reject such responses before
applying the length compatibility exceptions.

Fixes: 53b7c271f06b ("smb: client: restrict implied bcc[0] exemption to responses without data area")
Cc: stable@vger.kernel.org
Signed-off-by: Shoichiro Miyamoto <shoichiro.miyamoto@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb2misc.c