]> git.ipfire.org Git - people/ms/linux.git/commit - fs/ksmbd/smb2misc.c
ksmbd: validate credit charge after validating SMB2 PDU body size
authorRalph Boehme <slow@samba.org>
Fri, 15 Oct 2021 03:52:58 +0000 (12:52 +0900)
committerSteve French <stfrench@microsoft.com>
Fri, 15 Oct 2021 14:18:29 +0000 (09:18 -0500)
commit7a33488705008b5bb5f8d95d05326dcc64fc55f4
tree5827cc2c2eb08de156cb5299255057eaabf7fe5a
parent2ea086e35c3d726a3bacd0a971c1f02a50e98206
ksmbd: validate credit charge after validating SMB2 PDU body size

smb2_validate_credit_charge() accesses fields in the SMB2 PDU body,
but until smb2_calc_size() is called the PDU has not yet been verified
to be large enough to access the PDU dynamic part length field.

Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/smb2misc.c