PT-2026-161484
Publicado
2026-11-19
·
Atualizado
2026-11-19
Descrição por
Pontuação
N/A
Não disponívelNão há classificações de severidade ou métricas disponíveis. Quando houver, atualizaremos as informações correspondentes na página.
In the Linux kernel, the following vulnerability has been resolved:
KVM: PPC: Book3S HV: Add SRCU protection for virtual-mode HPT hcalls
The virtual-mode HPT hcall handlers (H ENTER, H REMOVE, H BULK REMOVE,
H CLEAR REF, H CLEAR MOD) call into book3s hv rm mmu.c, which accesses
memslots via kvm memslots raw(). kvm memslots raw() uses
rcu dereference raw check() to bypass SRCU lockdep annotation checking.
This is safe in real mode because the entire guest entry/exit is wrapped
in srcu read lock/unlock inside kvmppc run core() and
kvmhv run single vcpu().
However, since commit 6165d5dd99db ("KVM: PPC: Book3S HV: add virtual
mode handlers for HPT hcalls and page faults"), these same handlers are
also executed in virtual mode via kvmppc pseries do hcall(), which runs
after SRCU has already been released on guest exit.
A concurrent KVM SET USER MEMORY REGION deletion or move can therefore
call synchronize srcu expedited() — which does not wait for this thread —
and then kfree(slot) and vfree(slot->arch.rmap) while the hcall handler
still holds a raw pointer to the memslot. lock rmap() then writes to
freed vmalloc memory, leading to use-after-free and memory corruption.
Because kvm memslots raw() suppresses lockdep checks, this race is
entirely silent.
Fix this by factoring out the 7 HPT hcall handlers (H REMOVE, H ENTER,
H READ, H CLEAR MOD, H CLEAR REF, H PROTECT, H BULK REMOVE) into a
helper function, kvmppc pseries do hpt hcall(), and wrapping its call
site in srcu read lock(&kvm->srcu) / srcu read unlock(&kvm->srcu, idx).
Targeting only the HPT hcalls avoids wrapping non-HPT hcalls that sleep
(such as H CONFER, H REGISTER VPA, H PAGE INIT) or handlers that already
acquire SRCU internally (such as H RTAS).
Fornecedores
Produtos afetados
Identificadores relacionados
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾