CVE-2023-53603: scsi: qla2xxx: Avoid fcport pointer dereference
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
scsi: qla2xxx: Avoid fcport pointer dereference
Klocwork reported warning of NULL pointer may be dereferenced. The routine exits when sa_ctl is NULL and fcport is allocated after the exit call thus causing NULL fcport pointer to dereference at the time of exit.
To avoid fcport pointer dereference, exit the routine when sa_ctl is NULL.
The Linux kernel CVE team has assigned CVE-2023-53603 to this issue.
Affected and fixed versions
===========================
Fixed in 5.15.121 with commit 4406fe8a96a946c7ea5724ee59625755a1d9c59d Fixed in 6.1.40 with commit 477bc74ad1add644b606bff6ba1284943c42818a Fixed in 6.4.5 with commit 7bbeff613ec0560fb2f6f8b405288f3f043adf64 Fixed in 6.5 with commit 6b504d06976fe4a61cc05dedc68b84fadb397f77
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-2023-53603
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/qla2xxx/qla_edif.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/4406fe8a96a946c7ea5724ee59625755a1d9c59d https://git.kernel.org/stable/c/477bc74ad1add644b606bff6ba1284943c42818a https://git.kernel.org/stable/c/7bbeff613ec0560fb2f6f8b405288f3f043adf64 https://git.kernel.org/stable/c/6b504d06976fe4a61cc05dedc68b84fadb397f77