PCI: endpoint: Clean up error handling in vpci_scan_bus()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
PCI: endpoint: Clean up error handling in vpci_scan_bus()
Smatch complains about inconsistent NULL checking in vpci_scan_bus():
drivers/pci/endpoint/functions/pci-epf-vntb.c:1024 vpci_scan_bus() error: we previously assumed 'vpci_bus' could be null (see line 1021)
Instead of printing an error message and then crashing we should return an error code and clean up.
Also the NULL check is reversed so it prints an error for success instead of failure.
From the CVE record · Linux
The Linux kernel’s PCI endpoint vNTB function has incorrect NULL handling in vpci_scan_bus(). If vpci_bus is NULL, the error path can crash instead of returning an error; the input does not specify how an attacker could trigger this or whether access or user interaction is required.
Engineers running Linux kernels with the PCI endpoint vNTB function should check their installations; affected versions are not specified.