ksmbd: fix slab out of bounds write in smb_inherit_dacl()
authorNamjae Jeon <linkinjeon@kernel.org>
Sun, 5 Nov 2023 03:46:24 +0000 (12:46 +0900)
committerSteve French <stfrench@microsoft.com>
Wed, 8 Nov 2023 00:54:25 +0000 (18:54 -0600)
commiteebff19acaa35820cb09ce2ccb3d21bee2156ffb
tree2392ed5c8e614275ca15ad06246ca7ef26a14ae8
parent766e9cf3bd64c45fcace3acc6f8b3df815448ea3
ksmbd: fix slab out of bounds write in smb_inherit_dacl()

slab out-of-bounds write is caused by that offsets is bigger than pntsd
allocation size. This patch add the check to validate 3 offsets using
allocation size.

Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-22271
Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/smbacl.c