torvalds/linux
Memory safety / Use-after-free (stale PCI device reference in VF handling)
HIGH
The commit fixes a memory-safety vulnerability in the LiquidIO CN23XX driver where a cached pointer to a VF PCI device (dpiring_to_vfpcidev_lut) could be dereferenced after the VF device was removed or its reference dropped. The previous code cached VF PCI device pointers without proper reference management and later dereferenced them during OCC/FLR handling (via OCTEON_VF_ACTIVE path). The patch removes the cache and replaces it with a runtime lookup that derives the VF from the DPI ring, validates it against the PF, and performs proper reference handling (pcie_flr then pci_dev_put). This reduces the risk of use-after-free or invalid dereferences when handling VF FLR requests.