title: KVM: Destroy I/O bus devices on unregister failure _after_ sync'ing SRCU
description: In the Linux kernel, the following vulnerability has been resolved:
KVM: Destroy I/O bus devices on unregister failure _after_ sync'ing SRCU
If allocating a new instance of an I/O bus fails when unregistering a
device, wait to destroy the device until after all readers are guaranteed
to see the new null bus.  Destroying devices before the bus is nullified
could lead to use-after-free since readers expect the devices on their
reference of the bus to remain valid.
affected:
{
product: Linux
vendor: Linux
defaultStatus: unaffected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: f65886606c2d, lessThan: 03c6cccedd39, status: affected, versionType: git
version: f65886606c2d, lessThan: 4e899ca84863, status: affected, versionType: git
version: f65886606c2d, lessThan: 30f46c699373, status: affected, versionType: git
version: f65886606c2d, lessThan: 2ee3757424be, status: affected, versionType: git
}
{
product: Linux
vendor: Linux
defaultStatus: affected
repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
versions:
version: 5.9, status: affected
version: 0, lessThan: 5.9, status: unaffected, versionType: custom
version: 5.10.37, lessThanOrEqual: 5.10.*, status: unaffected, versionType: custom
version: 5.11.21, lessThanOrEqual: 5.11.*, status: unaffected, versionType: custom
version: 5.12.4, lessThanOrEqual: 5.12.*, status: unaffected, versionType: custom
version: 5.13, lessThanOrEqual: *, status: unaffected, versionType: original_commit_for_fix
}
