scsi: lpfc: Fix ioremap issues in lpfc_sli4_pci_mem_setup()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1351e69fc6db30e186295f1c9495d03cef6a01a2 · < 7e5a54d1f00725a739dcd20f616d82eff4f764bd| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: lpfc: Fix ioremap issues in lpfc_sli4_pci_mem_setup()
When if_type equals zero and pci_resource_start(pdev, PCI_64BIT_BAR4) returns false, drbl_regs_memmap_p is not remapped. This passes a NULL pointer to iounmap(), which can trigger a WARN() on certain arches.
When if_type equals six and pci_resource_start(pdev, PCI_64BIT_BAR4) returns true, drbl_regs_memmap_p may has been remapped and ctrl_regs_memmap_p is not remapped. This is a resource leak and passes a NULL pointer to iounmap().
To fix these issues, we need to add null checks before iounmap(), and change some goto labels.
From the CVE record · Linux
The Linux kernel lpfc driver can pass a NULL pointer to iounmap() under certain PCI resource and interface-type conditions, triggering a warning on some architectures. One of those conditions can also cause a resource leak. The input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running the Linux kernel with the lpfc SCSI driver should check their kernel; affected versions are not specified.