summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorWeibin Liu <liuwb@xiaopeng.com>2026-10-29 15:33:16 +0800
committerMartin K. Petersen (Oracle) <mkp@kernel.org>2026-11-20 21:20:18 -0500
commitefd68f17acca65f581b9f2fa9ba50c8643ab544d (patch)
treea485020cdd74666fabd5168e880fa238f156a8a2 /tools/lib/python
parent71b5da0b45fb83b590f1ec3df5361c7754b0e113 (diff)
scsi: mpt3sas: Validate data_out size before SMP link-reset check
_ctl_do_mpt_command() handles MPI2_FUNCTION_SMP_PASSTHROUGH by reading data[1] and data[10] of the data_out buffer to detect SMP link-reset requests. The non-IMMEDIATE path sets data = data_out after checking only for a NULL pointer, so a payload shorter than 11 bytes can read past the end of the buffer, and out-of-bounds bytes can unexpectedly set ioc_link_reset_in_progress and ignore_loginfos. However, a short SMP request is not invalid: SMP_REPORT_GENERAL, for example, can use an 8-byte payload. Rejecting every data_out smaller than 11 bytes would break valid requests. Instead, require enough data only when checking for a link reset, and keep sending the request normally otherwise. The IMMEDIATE path reads from the request frame rather than data_out, so data_out_sz does not apply to it. Fixes: f92363d12359 ("[SCSI] mpt3sas: add new driver supporting 12GB SAS") Cc: stable@vger.kernel.org # 3.8+ Reviewed-by: Guanglei Zhu <zhugl3@xiaopeng.com> Signed-off-by: Weibin Liu <liuwb@xiaopeng.com> Link: https://patch.msgid.link/20261029073316.4188569-1-liuwb@xiaopeng.com Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions