summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorFrank Sorenson <sorenson@redhat.com>2026-09-16 16:33:53 -0500
committerPaulo Alcantara <pc@manguebit.org>2026-09-17 15:03:49 -0300
commitb4694f269e66dfcd66991446375285723b6957bd (patch)
treee8a006925955edca758f296e49e01752dfd2941f /tools/perf/scripts/python/bin
parent05762c5bc1cfdcac36747994fde2c04387a457f1 (diff)
downloadlinux-next-b4694f269e66dfcd66991446375285723b6957bd.tar.gz
linux-next-b4694f269e66dfcd66991446375285723b6957bd.zip
smb: client: validate minimum PDU size before smb2_get_data_area_len()
__smb2_calc_size() calls smb2_get_data_area_len(), which reads command-specific struct fields to locate the data area. However, smb2_check_message() only validates StructureSize2, meaning a truncated response could cause smb2_get_data_area_len() to read out-of-bounds. Replace has_smb2_data_area[] with smb2_min_pdu_len[], which is now used to indicate both whether a command's response has a data area and the size of that fixed response struct. A non-zero entry means the command has a data area, and is the minimum length required before the struct is read. For each command with a data area, PDUs shorter than this minimum size are rejected instead of parsed. The minimum is not applied to SMB2 error responses, which carry only the 9-byte error body, the same exemption the StructureSize2 check above it already makes. STATUS_MORE_PROCESSING_REQUIRED is treated as a normal reply, since an in-progress SESSION_SETUP response carries a full body and a security blob. Signed-off-by: Frank Sorenson <sorenson@redhat.com> Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions