Paulo Alcantara 94b064984a smb: client: fix parsing of SMB3.1.1 POSIX create context
[ Upstream commit 76025cc2285d9ede3d717fe4305d66f8be2d9346 ]

The data offset for the SMB3.1.1 POSIX create context will always be
8-byte aligned so having the check 'noff + nlen >= doff' in
smb2_parse_contexts() is wrong as it will lead to -EINVAL because noff
+ nlen == doff.

Fix the sanity check to correctly handle aligned create context data.

Fixes: af1689a9b770 ("smb: client: fix potential OOBs in smb2_parse_contexts()")
Signed-off-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
[Guru:smb2_parse_contexts()  is present in file smb2ops.c,
smb2ops.c file location is changed, modified patch accordingly.]
Signed-off-by: Guruswamy Basavaiah <guruswamy.basavaiah@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-01 13:16:43 +01:00
..
2021-09-18 13:40:15 +02:00
2024-02-23 08:42:14 +01:00
2023-09-19 12:20:23 +02:00
2023-02-22 12:55:54 +01:00
2023-09-23 11:01:09 +02:00
2022-06-09 10:21:16 +02:00
2023-12-08 08:46:15 +01:00
2023-01-04 11:39:23 +01:00
2023-01-14 10:16:27 +01:00