KVM: SVM: Fix a (very) unlikely UAF for GA Log IRQs
Status from this message: Applied to kvm-x86 svm, and I even remembered to drop the avic_vm_init()
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 6 repliesApplied
- v12 patches 4 repliesSuperseded
Changes in v2 from the cover letter
- Defer adding the VM to the GA Log list until a vCPU is created (KVM only needs GA Lot notifications to wake blocking vCPUs), so that removing the VM from the list can be done during pre-destroy without having to handle the scenario where VM creation fails at a later stage. [Sashiko, Xiao]
- Drop the stable@ tag, as it's not clear to me that the bug can actually occur in the wild, whereas the changes themselves are somewhat risky.
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | KVM: SVM: Make kvm_x86_ops.vcpu_precreate() hook fully AVIC specificarch/ arch/ arch/ | +12 | 1 reply | |
| 2/3 | KVM: SVM: Do all per-VM AVIC initialization during vCPU precreation phasearch/ arch/ | +57 | 2 replies | |
| 3/3 | KVM: SVM: Remove VM from the GA Log notifier list before VM destructionarch/ arch/ arch/ | +15 | 2 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Naveen N Rao (AMD) |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] KVM: SVM: Fix a (very) unlikely UAF for GA Log IRQs
Fix a potential UAF due to freeing vCPUs while they're still reachable through the global hashed list used to handle GA Log notifications.
v2:
- Defer adding the VM to the GA Log list until a vCPU is created (KVM only needs GA Lot notifications to wake blocking vCPUs), so that removing the VM from the list can be done during pre-destroy without having to handle the scenario where VM creation fails at a later stage. [Sashiko, Xiao]
- Drop the stable@ tag, as it's not clear to me that the bug can actually occur in the wild, whereas the changes themselves are somewhat risky.
v1: https://lore.kernel.org/all/[email protected]
Sean Christopherson (3):
KVM: SVM: Make kvm_x86_ops.vcpu_precreate() hook fully AVIC specific
KVM: SVM: Do all per-VM AVIC initialization during vCPU precreation
phase
KVM: SVM: Remove VM from the GA Log notifier list before VM
destruction
arch/x86/kvm/svm/avic.c | 96 +++++++++++++++++++++++++++-------------- arch/x86/kvm/svm/svm.c | 16 ++----- arch/x86/kvm/svm/svm.h | 3 +- 3 files changed, 69 insertions(+), 46 deletions(-)
base-commit: a204badd8432f93b7e862e7dac6db0fe3d65f370
Signature · 1 line
2.55.0.rc0.799.gd6f94ed593-goog