sst-linux/fs/smb
Norbert Szetei 3ac65de111 ksmbd: validate zero num_subauth before sub_auth is accessed
commit bf21e29d78cd2c2371023953d9c82dfef82ebb36 upstream.

Access psid->sub_auth[psid->num_subauth - 1] without checking
if num_subauth is non-zero leads to an out-of-bounds read.
This patch adds a validation step to ensure num_subauth != 0
before sub_auth is accessed.

Cc: stable@vger.kernel.org
Signed-off-by: Norbert Szetei <norbert@doyensec.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-10 14:33:43 +02:00
..
client smb: client: fix potential UAF in cifs_dump_full_key() 2025-03-28 21:58:58 +01:00
common
server ksmbd: validate zero num_subauth before sub_auth is accessed 2025-04-10 14:33:43 +02:00
Kconfig
Makefile