scsi: mpt3sas: Fix NULL pointer access in mpt3sas_transport_port_add()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 78316e9dfc24906dd474630928ed1d3c562b568e · < d3c57724f1569311e4b81e98fad0931028b9bdcd| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s mpt3sas SCSI driver may access a NULL pointer in mpt3sas_transport_port_add() if rphy allocation or sas_rphy_add() fails. The input does not establish whether an attacker can trigger this condition, or specify any network, authentication, or user-interaction requirements.
Engineers running Linux kernels with the mpt3sas SCSI driver should check their versions; affected versions were not provided.