mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
ksmbd server fix, also for stable
-----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmWM/+gACgkQiiy9cAdy T1H6NAv/a/hJO2dQB8/7Ts7Y3XTDP0hqvJEu2RRx0LuK5ERSTr7zEUgDP0W8HYpO IHvlOnOCa3n68EJGVa9OolYRWgAIX2qYXrGx4+iEWJaLIDsdPgyZdfU0YgwjdmgD xHjadidNfmrahfc/r6s8C9HBE9J/LVpFyHnCmasAw7V4p+7mBL/Ycwkm3BmbX0Sp /gSX5ITOPZdGJl97OS7elkA7t2ABLaJXeHPKCHgKYiwx9TbpH75WxM2Kpfsk2LaO yaEWW/JTgr+Vg+EYUTumKGONhKpgx+rgqIGiZYwWu42aEXp+53JM8f67FWihDvL5 2t4uei8GaeuXRrYTSq/ylfy10V9BOcraf3SV/pJ6C9NvAWUoGiVKRFj62BjZSxJp E8Pdj4wy97hFa9gaEyMg81w02CvGe19R1ikLzSXA8GJLnlg+rBLzEt/1g0gQ6YI/ vj8Ett6m5ezkW1Q7V3yCvjDN9IrYV0q138ZBtcjJm9P9EWHXzpDKXoUVcaXGNw31 gM5eRPNE =/4UC -----END PGP SIGNATURE----- Merge tag '6.7rc7-smb3-srv-fix' of git://git.samba.org/ksmbd Pull ksmbd server fix from Steve French: - address possible slab out of bounds in parsing of open requests * tag '6.7rc7-smb3-srv-fix' of git://git.samba.org/ksmbd: ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()
This commit is contained in:
commit
8735c7c84d
@ -106,16 +106,25 @@ static int smb2_get_data_area_len(unsigned int *off, unsigned int *len,
|
||||
break;
|
||||
case SMB2_CREATE:
|
||||
{
|
||||
unsigned short int name_off =
|
||||
le16_to_cpu(((struct smb2_create_req *)hdr)->NameOffset);
|
||||
unsigned short int name_len =
|
||||
le16_to_cpu(((struct smb2_create_req *)hdr)->NameLength);
|
||||
|
||||
if (((struct smb2_create_req *)hdr)->CreateContextsLength) {
|
||||
*off = le32_to_cpu(((struct smb2_create_req *)
|
||||
hdr)->CreateContextsOffset);
|
||||
*len = le32_to_cpu(((struct smb2_create_req *)
|
||||
hdr)->CreateContextsLength);
|
||||
break;
|
||||
if (!name_len)
|
||||
break;
|
||||
|
||||
if (name_off + name_len < (u64)*off + *len)
|
||||
break;
|
||||
}
|
||||
|
||||
*off = le16_to_cpu(((struct smb2_create_req *)hdr)->NameOffset);
|
||||
*len = le16_to_cpu(((struct smb2_create_req *)hdr)->NameLength);
|
||||
*off = name_off;
|
||||
*len = name_len;
|
||||
break;
|
||||
}
|
||||
case SMB2_QUERY_INFO:
|
||||
|
Loading…
Reference in New Issue
Block a user