HIGH
scsi FrameSize Overflow
CVE-2026-23059
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: scsi: qla2xxx: Sanitize payload size to prevent member overflow In qla27xx_copy_fpin_pkt() and qla27xx_copy_multiple_pkt(), the frame_size reported by firmware is used to calculate the copy length into item->iocb. However, the iocb member is defined as a fixed-size 64-byte array within struct purex_item. If the reported frame_size exceeds 64 bytes, subsequent memcpy calls will overflow the iocb member boundary. While extra memory might be allocated, this cross-member write is unsafe and triggers warnings under CONFIG_FORTIFY_SOURCE. Fix this by capping total_bytes to the size of the iocb member (64 bytes) before allocation and copying. This ensures all copies remain within the bounds of the destination structure member.
02KernelScan AI Analysis
Risk summary
Systems with QLogic FC/NVMe HBAs connected to a Fibre Channel fabric are vulnerable to kernel memory corruption. An attacker capable of injecting malformed FC frames onto the fabric can trigger an out-of-bounds write in the qla2xxx driver, leading to potential kernel code execution or system panic.
Vulnerability analysis
The vulnerability exists in the qla2xxx driver functions qla27xx_copy_fpin_pkt() and qla27xx_copy_multiple_pkt(), which process firmware-reported frame sizes from incoming FC frames. The driver uses the frame_size to calculate a copy length into the fixed 64-byte item->iocb member. When a malformed frame reports a size exceeding 64 bytes, the subsequent memcpy performs an out-of-bounds write beyond the iocb boundary, corrupting adjacent kernel memory. Because the HBA processes unsolicited frames directly from the FC fabric, the attack can be initiated by any actor with access to the fabric without requiring physical access to the target host or privileges on it. The fix adds a bounds check to cap total_bytes to the iocb member size before allocation and copying.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 6.12 | 6.12.68 | 1922468a4a80 |
| 6.18 | 6.18.8 | aa14451fa5d5 |
| 6.6 | 6.6.122 | 408bfa8d70f7 |
| mainline | 6.19 | 19bc5f2a6962 |