Skip to contentSkip to conversation

CVE-2025-38332: scsi: lpfc: Use memcpy() for BIOS version

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jul 10, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2025-38332 to this issue.

Affected and fixed versions
===========================

	Fixed in 5.4.295 with commit ac7bfaa099ec3e4d7dfd0ab9726fc3bc7911365d
	Fixed in 5.10.239 with commit b699bda5db818b684ff62d140defd6394f38f3d6
	Fixed in 5.15.186 with commit d34f2384d6df11a6c67039b612c2437f46e587e8
	Fixed in 6.1.142 with commit 75ea8375c5a83f46c47bfb3de6217c7589a8df93
	Fixed in 6.6.95 with commit 34c0a670556b24d36c9f8934227edb819ca5609e
	Fixed in 6.12.35 with commit 2f63bf0d2b146956a2f2ff3b25cee71019e64561
	Fixed in 6.15.4 with commit 003baa7a1a152576d744bd655820449bbdb0248e
	Fixed in 6.16-rc1 with commit ae82eaf4aeea060bb736c3e20c0568b67c701d7d

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2025-38332

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/scsi/lpfc/lpfc_sli.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/ac7bfaa099ec3e4d7dfd0ab9726fc3bc7911365d
	https://git.kernel.org/stable/c/b699bda5db818b684ff62d140defd6394f38f3d6
	https://git.kernel.org/stable/c/d34f2384d6df11a6c67039b612c2437f46e587e8
	https://git.kernel.org/stable/c/75ea8375c5a83f46c47bfb3de6217c7589a8df93
	https://git.kernel.org/stable/c/34c0a670556b24d36c9f8934227edb819ca5609e
	https://git.kernel.org/stable/c/2f63bf0d2b146956a2f2ff3b25cee71019e64561
	https://git.kernel.org/stable/c/003baa7a1a152576d744bd655820449bbdb0248e
	https://git.kernel.org/stable/c/ae82eaf4aeea060bb736c3e20c0568b67c701d7d