Commit e2c07ca
committed
KVM: arm64: vgic-its: Avoid potential UAF in LPI translation cache
jira VULN-42535
cve CVE-2024-26598
commit-author Oliver Upton <oliver.upton@linux.dev>
commit ad362fe
There is a potential UAF scenario in the case of an LPI translation
cache hit racing with an operation that invalidates the cache, such
as a DISCARD ITS command. The root of the problem is that
vgic_its_check_cache() does not elevate the refcount on the vgic_irq
before dropping the lock that serializes refcount changes.
Have vgic_its_check_cache() raise the refcount on the returned vgic_irq
and add the corresponding decrement after queueing the interrupt.
Cc: stable@vger.kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240104183233.3560639-1-oliver.upton@linux.dev
(cherry picked from commit ad362fe)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent fccb8e9 commit e2c07ca
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
| 598 | + | |
598 | 599 | | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
599 | 603 | | |
600 | 604 | | |
601 | 605 | | |
| |||
774 | 778 | | |
775 | 779 | | |
776 | 780 | | |
| 781 | + | |
777 | 782 | | |
778 | 783 | | |
779 | 784 | | |
| |||
0 commit comments