scsi: lpfc: Use memcpy() for BIOS version
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b3b4f3e1d575fe142fd437158425c2359b695ff1 · < 2f63bf0d2b146956a2f2ff3b25cee71019e64561| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: lpfc: Use memcpy() for BIOS version
The strlcat() with FORTIFY support is triggering a panic because it thinks the target buffer will overflow although the correct target buffer size is passed in.
Anyway, instead of memset() with 0 followed by a strlcat(), just use memcpy() and ensure that the resulting buffer is NULL terminated.
BIOSVersion is only used for the lpfc_printf_log() which expects a properly terminated string.
From the CVE record · Linux
The Linux kernel's lpfc SCSI driver can panic when FORTIFY checks a strlcat() call used to copy the BIOS version, even though the correct buffer size is supplied. The input does not specify an attacker action, access requirements, or whether user interaction is needed.
Engineers running Linux kernels with the lpfc SCSI driver should check their installations; affected versions are not specified.