Commit ab1ad02
committed
scsi: lpfc: Use memcpy() for BIOS version
jira VULN-72457
cve CVE-2025-38332
commit-author Daniel Wagner <wagi@kernel.org>
commit ae82eaf
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.
Signed-off-by: Daniel Wagner <wagi@kernel.org>
Link: https://lore.kernel.org/r/20250409-fix-lpfc-bios-str-v1-1-05dac9e51e13@kernel.org
Reviewed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit ae82eaf)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent 0732e6e commit ab1ad02
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5946 | 5946 | | |
5947 | 5947 | | |
5948 | 5948 | | |
5949 | | - | |
5950 | | - | |
| 5949 | + | |
5951 | 5950 | | |
| 5951 | + | |
5952 | 5952 | | |
5953 | 5953 | | |
5954 | 5954 | | |
| |||
0 commit comments