diff options
| author | Ratnaker Gautam <ratnaker.gautam@kuleuven.be> | 2026-10-17 23:15:05 +0200 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-10-21 21:23:15 -0300 |
| commit | 83d0d5e0ca22233c75daf139ec0063b9d2ff1ac7 (patch) | |
| tree | b9a9305d49a071261d7f44472e1bd17522143e9f /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 8fc9af68c57156ff64769f30e831553cd03b3000 (diff) | |
| download | linux-83d0d5e0ca22233c75daf139ec0063b9d2ff1ac7.tar.gz linux-83d0d5e0ca22233c75daf139ec0063b9d2ff1ac7.zip | |
smb: client: validate NT transaction response layout and offsets
validate_ntransact() assumes that the response uses the fixed 18-word NT
transaction layout. A different WordCount makes get_bcc() locate the byte
count at a different offset from pSMBr->ByteCount, allowing the subsequent
bounds checks to use inconsistent response boundaries.
The function also turns the 32-bit ParameterOffset and DataOffset fields
into pointers before checking their bounds. On a 32-bit client, a large
offset can wrap the pointer below end_of_smb and pass the one-sided pointer
comparison. The caller then dereferences the parameter pointer or copies
from the data pointer.
Require the expected WordCount before reading the byte count. Check each
offset and count against the received SMB length as integers before forming
either pointer. Use subtraction after validating the offset so that the
range checks cannot overflow.
Reported-by: Ratnaker Gautam <ratnaker.gautam@kuleuven.be>
Fixes: 0a4b92c05ed0 ("[CIFS] Add worker function for Get ACL cifs style")
Cc: stable@vger.kernel.org
Signed-off-by: Ratnaker Gautam <ratnaker.gautam@kuleuven.be>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
