wan: wanxl: Only reset hardware after BAR mapping
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 59cbe6cfa0fa23c192351cc284e30707309f6741| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wan: wanxl: Only reset hardware after BAR mapping
wanxl_pci_init_one() stores the freshly allocated card in driver data before the PLX BAR is mapped. Several early probe failures then unwind through wanxl_pci_remove_one(), including failure to allocate the coherent status area or to restore the DMA mask.
wanxl_pci_remove_one() unconditionally calls wanxl_reset(), and wanxl_reset() dereferences card->plx. On those early failures card->plx is still NULL, so the error path can dereference a NULL MMIO pointer.
Only issue the hardware reset once the BAR mapping exists. The remaining cleanup in wanxl_pci_remove_one() already checks whether later resources were allocated.
This issue was found by a static analysis checker and confirmed by manual source review.
From the CVE record · Linux
The Linux kernel's wanxl PCI driver can dereference a NULL MMIO pointer when an early device-probe failure triggers cleanup before the PLX BAR is mapped. This can occur if allocation of the coherent status area or restoration of the DMA mask fails. The input does not establish an attacker-controlled trigger.
Engineers running Linux kernels with the wanxl PCI driver should check their versions; affected versions are not specified.