mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
gnttab: properly drop page ref on a GNTTAB_cache_flush error path
Ordinary domains always have a grant table. System domains don't, but they also don't normally "own" pages - except for DOM_IO and DOM_COW on x86. This is XSA-520 / CVE-2026-102700. Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Reported-by: Yehyeong Lee <yhlee@isslab.korea.ac.kr> Signed-off-by: Jan Beulich <jbeulich@suse.com> (cherry picked from commit 6a355a772ca5205b8de29c58cfc3cef4f2ba8238)
This commit is contained in:
1 parent
73e870d092
commit
3fce8895d9
1 file changed
+2
@@ -3635,6 +3635,8 @@ static int _cache_flush(gnttab_cache_flush_t *cflush, grant_ref_t *cur_ref)
|
|||||||
owner = page_get_owner_and_reference(page);
|
owner = page_get_owner_and_reference(page);
|
||||||
if ( !owner || !owner->grant_table )
|
if ( !owner || !owner->grant_table )
|
||||||
{
|
{
|
||||||
|
if ( owner )
|
||||||
|
put_page(page);
|
||||||
rcu_unlock_domain(d);
|
rcu_unlock_domain(d);
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
}
|
}
|
||||||
|
|||||||