Fixed
Created: Dec 7, 2025
Updated: Mar 3, 2026
Resolved Date: Jan 19, 2026
Found In Version: 10.24.33.1
Fix Version: 10.24.33.14
Severity: Standard
Applicable for: Wind River Linux LTS 24
Component/s: Kernel
In the Linux kernel, the following vulnerability has been resolved:[EOL][EOL]PCI/IOV: Add PCI rescan-remove locking when enabling/disabling SR-IOV[EOL][EOL]Before disabling SR-IOV via config space accesses to the parent PF,[EOL]sriov_disable() first removes the PCI devices representing the VFs.[EOL][EOL]Since commit 9d16947b7583 ("PCI: Add global pci_lock_rescan_remove()")[EOL]such removal operations are serialized against concurrent remove and[EOL]rescan using the pci_rescan_remove_lock. No such locking was ever added[EOL]in sriov_disable() however. In particular when commit 18f9e9d150fc[EOL]("PCI/IOV: Factor out sriov_add_vfs()") factored out the PCI device[EOL]removal into sriov_del_vfs() there was still no locking around the[EOL]pci_iov_remove_virtfn() calls.[EOL][EOL]On s390 the lack of serialization in sriov_disable() may cause double[EOL]remove and list corruption with the below (amended) trace being observed:[EOL][EOL] PSW: 0704c00180000000 0000000c914e4b38 (klist_put+56)[EOL] GPRS: 000003800313fb48 0000000000000000 0000000100000001 0000000000000001[EOL]\t00000000f9b520a8 0000000000000000 0000000000002fbd 00000000f4cc9480[EOL]\t0000000000000001 0000000000000000 0000000000000000 0000000180692828[EOL]\t00000000818e8000 000003800313fe2c 000003800313fb20 000003800313fad8[EOL] #0 [3800313fb20] device_del at c9158ad5c[EOL] #1 [3800313fb88] pci_remove_bus_device at c915105ba[EOL] #2 [3800313fbd0] pci_iov_remove_virtfn at c9152f198[EOL] #3 [3800313fc28] zpci_iov_remove_virtfn at c90fb67c0[EOL] #4 [3800313fc60] zpci_bus_remove_device at c90fb6104[EOL] #5 [3800313fca0] __zpci_event_availability at c90fb3dca[EOL] #6 [3800313fd08] chsc_process_sei_nt0 at c918fe4a2[EOL] #7 [3800313fd60] crw_collect_info at c91905822[EOL] #8 [3800313fe10] kthread at c90feb390[EOL] #9 [3800313fe68] __ret_from_fork at c90f6aa64[EOL] #10 [3800313fe98] ret_from_fork at c9194f3f2.[EOL][EOL]This is because in addition to sriov_disable() removing the VFs, the[EOL]platform also generates hot-unplug events for the VFs. This being the[EOL]reverse operation to the hotplug events generated by sriov_enable() and[EOL]handled via pdev->no_vf_scan. And while the event processing takes[EOL]pci_rescan_remove_lock and checks whether the struct pci_dev still exists,[EOL]the lack of synchronization makes this checking racy.[EOL][EOL]Other races may also be possible of course though given that this lack of[EOL]locking persisted so long observable races seem very rare. Even on s390 the[EOL]list corruption was only observed with certain devices since the platform[EOL]events are only triggered by config accesses after the removal, so as long[EOL]as the removal finished synchronously they would not race. Either way the[EOL]locking is missing so fix this by adding it to the sriov_del_vfs() helper.[EOL][EOL]Just like PCI rescan-remove, locking is also missing in sriov_add_vfs()[EOL]including for the error case where pci_stop_and_remove_bus_device() is[EOL]called without the PCI rescan-remove lock being held. Even in the non-error[EOL]case, adding new PCI devices and buses should be serialized via the PCI[EOL]rescan-remove lock. Add the necessary locking.