[PATCH v4 0/2] KVM: arm64: vgic: Fix racy LPI release and re-registration handling
Carlos López
clopez at suse.de
Fri Jul 3 05:25:59 PDT 2026
Fix a couple of potential issues that could arise from racy LPI release
and re-registration for the same INTID.
The issue fixed in patch 1 can manifest itself through either a
leaked LPI structure, or a prematurely deleted LPI. The issue fixed
in patch 2 could materialize as a spurious -ENOMEM failure when
registering an LPI.
v4:
* Add __GFP_ACCOUNT to patch 2 (Sashiko).
v3:
* Use refcount_dec_and_lock_irqsave() instead of unconditionally
grabbing the xarray lock in patch 1.
* Add patch 2.
v2:
* Address Sashiko's review. Fix the direct release path by decrementing
the refcount under the xarray spinlock, preventing a UAF that would
have been introduced in v1.
Carlos López (2):
KVM: arm64: vgic: Fix race between LPI release and re-registration
KVM: arm64: vgic: Mitigate potential LPI registration failure
arch/arm64/kvm/vgic/vgic-its.c | 11 ++++++++++-
arch/arm64/kvm/vgic/vgic.c | 10 ++++++----
2 files changed, 16 insertions(+), 5 deletions(-)
base-commit: 1ee27dacbe5dc4def481794d899d67b0d4570094
--
2.51.0
More information about the linux-arm-kernel
mailing list