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>
This commit is contained in:
1 parent
a27d05cbab
commit
f1e1321c87
1 file changed
+2
@@ -3637,6 +3637,8 @@ static int _cache_flush(gnttab_cache_flush_t *cflush, grant_ref_t *cur_ref)
|
||||
owner = page_get_owner_and_reference(page);
|
||||
if ( !owner || !owner->grant_table )
|
||||
{
|
||||
if ( owner )
|
||||
put_page(page);
|
||||
rcu_unlock_domain(d);
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||