CVE-2026-139368: scsi: libsas: Fix out-of-bounds memcpy() in sas_ssp_task_response()
In the Linux kernel, the following vulnerability has been resolved:
scsi: libsas: Fix out-of-bounds memcpy() in sasssptaskresponse()
The mint(int, ...) clamp of the device-provided sensedatalen turns negative for values >= 0x80000000 and is then used as the memcpy() length, reading and writing out of bounds. Compare as u32 instead. Well-formed responses are unaffected.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.275 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.226 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
In sas_ssp_task_response(), compare sense_data_len as u32 rather than using a signed int clamp, which can become negative for values >= 0x80000000.
Event History
Frequently Asked Questions
What kind of input is required to trigger the out-of-bounds copy?
The vulnerable path requires a device-provided SCSI sense_data_len value of at least 0x80000000. This causes the signed clamp result to become negative and then be used as the memcpy() length.
Are normal SCSI task responses affected?
No. The available information states that well-formed responses are unaffected.
Which systems should be prioritized for triage?
Prioritize Linux systems using the kernel libsas SCSI subsystem where a device can provide malformed task-response data. The issue is in sas_ssp_task_response().
How can I determine whether the fix is present?
Check whether the installed kernel includes the upstream stable fix referenced by the listed kernel.org commits. The corrected implementation compares sense_data_len as u32 rather than allowing the signed min_t(int, ...) clamp to produce a negative copy length.