Commit e07fc9e
KVM: arm64: Fix page leak in user_mem_abort() on atomic fault
When a guest performs an atomic/exclusive operation on memory lacking
the required attributes, user_mem_abort() injects a data abort and
returns early. However, it fails to release the reference to the
host page acquired via __kvm_faultin_pfn().
A malicious guest could repeatedly trigger this fault, leaking host
page references and eventually causing host memory exhaustion (OOM).
Fix this by consolidating the early error returns to a new out_put_page
label that correctly calls kvm_release_page_unused().
Fixes: 2937aee ("KVM: arm64: Handle DABT caused by LS64* instructions on unsupported memory")
Signed-off-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Yuan Yao <yaoyuan@linux.alibaba.com>
Link: https://patch.msgid.link/20260304162222.836152-2-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>1 parent eb54fa1 commit e07fc9e
1 file changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1837 | 1837 | | |
1838 | 1838 | | |
1839 | 1839 | | |
1840 | | - | |
1841 | | - | |
1842 | | - | |
1843 | | - | |
| 1840 | + | |
| 1841 | + | |
1844 | 1842 | | |
1845 | 1843 | | |
1846 | 1844 | | |
| |||
1850 | 1848 | | |
1851 | 1849 | | |
1852 | 1850 | | |
1853 | | - | |
| 1851 | + | |
| 1852 | + | |
1854 | 1853 | | |
1855 | 1854 | | |
1856 | 1855 | | |
| |||
1936 | 1935 | | |
1937 | 1936 | | |
1938 | 1937 | | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
1939 | 1942 | | |
1940 | 1943 | | |
1941 | 1944 | | |
| |||
0 commit comments