ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f5cda257296fbd3683b1f568f2d94d3caaacf74d · < ff128fbea720bf763fa345680dda5f050bc24a47| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()
In an unlikely (and probably wrong?) case that the 'ppi' parameter of ata_host_alloc_pinfo() points to an array starting with a NULL pointer, there's going to be a kernel oops as the 'pi' local variable won't get reassigned from the initial value of NULL. Initialize 'pi' instead to '&ata_dummy_port_info' to fix the possible kernel oops for good...
Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool.
From the CVE record · Linux
A NULL pointer dereference in ata_host_alloc_pinfo() can cause a kernel oops if its ppi parameter points to an array beginning with NULL. The input does not describe an attacker-controlled way to trigger this condition or specify access or user-interaction requirements.
Engineers running the Linux kernel should check whether their build includes the libata-core fix; affected versions are not specified.