In the Linux kernel, the following vulnerability has been resolved:
scsi: mpt3sas: Fix NULL pointer access in mpt3sas_transport_port_add()
Port is allocated by sas_port_alloc_num() and rphy is allocated by either sas_end_device_alloc() or sas_expander_alloc(), all of which may return NULL. So we need to check the rphy to avoid possible NULL pointer access.
If sas_rphy_add() returned with failure, rphy is set to NULL. We would access the rphy in the following lines which would also result NULL pointer access.
| Software | From | Fixed in |
|---|---|---|
| linux / linux_kernel | 5.4.229 | 5.4.238 |
| linux / linux_kernel | 5.10.163 | 5.10.176 |
| linux / linux_kernel | 5.15.86 | 5.15.104 |
| linux / linux_kernel | 6.0.16 | 6.1 |
| linux / linux_kernel | 6.1.2 | 6.1.21 |
| linux / linux_kernel | 6.2 | 6.2.8 |
| linux / linux_kernel | 6.3-rc1 | 6.3-rc1.x |
| linux / linux_kernel | 6.3-rc2 | 6.3-rc2.x |