public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/xen] f43: arbitrary read/write via grant copy
@ 2026-11-05 21:42 Michael Young
  0 siblings, 0 replies; only message in thread
From: Michael Young @ 2026-11-05 21:42 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/xen
Branch : f43
Commit : 606ab70f8b236e5b7bc4925767d4521afa03e5da
Author : Michael Young <m.a.young@durham.ac.uk>
Date   : 2026-11-05T21:42:03+00:00
Stats  : +103/-1 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/xen/c/606ab70f8b236e5b7bc4925767d4521afa03e5da?branch=f43

Log:
arbitrary read/write via grant copy

---
diff --git a/xen.spec b/xen.spec
index ccfd839..43e9ae3 100644
--- a/xen.spec
+++ b/xen.spec
@@ -51,7 +51,7 @@
 Summary: Xen is a virtual machine monitor
 Name:    xen
 Version: 4.20.4
-Release: 4%{?dist}
+Release: 5%{?dist}
 # Automatically converted from old format: GPLv2+ and LGPLv2+ and BSD - review is highly recommended.
 License: GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+ AND LicenseRef-Callaway-BSD
 URL:     http://xen.org/
@@ -90,6 +90,8 @@ Patch58: xsa518-4.20.patch
 Patch59: xsa519-4.20-1.patch
 Patch60: xsa519-4.20-2.patch
 Patch61: xsa520.patch
+Patch62: xsa523-1.patch
+Patch63: xsa523-2.patch
 
 
 # build using Fedora seabios and ipxe packages for roms
@@ -281,6 +283,8 @@ manage Xen virtual machines.
 %patch 59 -p1
 %patch 60 -p1
 %patch 61 -p1
+%patch 62 -p1
+%patch 63 -p1
 
 # stubdom sources
 cp -v %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} stubdom
@@ -830,6 +834,10 @@ fi
 %endif
 
 %changelog
+* Thu Nov 05 2026 Michael Young <m.a.young@durham.ac.uk> - 4.20.4-5
+- arbitrary read/write via grant copy
+        [XSA-523, CVE-2026-102703, CVE-2026-102704]
+
 * Fri Oct 30 2026 Michael Young <m.a.young@durham.ac.uk> - 4.20.4-4
 - wrong version of xsa518 patch in last build
 

diff --git a/xsa523-1.patch b/xsa523-1.patch
new file mode 100644
index 0000000..94e19b0
--- /dev/null
+++ b/xsa523-1.patch
@@ -0,0 +1,33 @@
+From: Jan Beulich <jbeulich@suse.com>
+Subject: gnttab: complete checking in gnttab_copy_buf_valid()
+
+The ->have_grant field needs checking not only ahead of comparing GREFs,
+but also ahead of comparing MFNs. Else a (likely invalid) GREF from an
+earlier batch element can be mistaken for a (possibly valid) MFN.
+
+This is CVE-2026-102703, part of XSA-523.
+
+Fixes: d28f42f2703e ("grant-table: defer releasing pages acquired in a grant copy")
+Assisted-by: Claude
+Reported-by: Stephan Lipp <Stephan@Adalogics.com>
+Reported-by: CodeAnt AI Security Research <securityresearch@codeant.ai>
+Signed-off-by: Jan Beulich <jbeulich@suse.com>
+Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
+
+diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
+index b15805f3f94d..3dc5ff88da85 100644
+--- a/xen/common/grant_table.c
++++ b/xen/common/grant_table.c
+@@ -3083,10 +3083,10 @@ static bool gnttab_copy_buf_valid(
+     const struct gnttab_copy_ptr *p, const struct gnttab_copy_buf *b,
+     bool has_gref)
+ {
+-    if ( !b->virt )
++    if ( !b->virt || b->have_grant != has_gref )
+         return 0;
+     if ( has_gref )
+-        return b->have_grant && p->u.ref == b->ptr.u.ref;
++        return p->u.ref == b->ptr.u.ref;
+     return p->u.gmfn == b->ptr.u.gmfn;
+ }
+ 

diff --git a/xsa523-2.patch b/xsa523-2.patch
new file mode 100644
index 0000000..4cb58fd
--- /dev/null
+++ b/xsa523-2.patch
@@ -0,0 +1,61 @@
+From: Jan Beulich <jbeulich@suse.com>
+Subject: gnttab: move "only local domain may copy by frame" check
+
+gnttab_copy_one() calls gnttab_copy_lock_domain{s,}() only conditionally.
+The non-GREF check towards the requestor being DOMID_SELF, however, needs
+doing on every batch element. Move the check into gnttab_copy_claim_buf()
+to achieve that.
+
+This is CVE-2026-102704, part of XSA-523.
+
+Fixes: d28f42f2703e ("grant-table: defer releasing pages acquired in a grant copy")
+Assisted-by: Claude
+Reported-by: Stephan Lipp <Stephan@Adalogics.com>
+Reported-by: CodeAnt AI Security Research <securityresearch@codeant.ai>
+Signed-off-by: Jan Beulich <jbeulich@suse.com>
+Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
+
+diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
+index 3dc5ff88da85..5e79c012b695 100644
+--- a/xen/common/grant_table.c
++++ b/xen/common/grant_table.c
+@@ -2936,13 +2936,8 @@ struct gnttab_copy_buf {
+     bool have_type;
+ };
+ 
+-static int gnttab_copy_lock_domain(domid_t domid, bool is_gref,
+-                                   struct gnttab_copy_buf *buf)
++static int gnttab_copy_lock_domain(domid_t domid, struct gnttab_copy_buf *buf)
+ {
+-    /* Only DOMID_SELF may reference via frame. */
+-    if ( domid != DOMID_SELF && !is_gref )
+-        return GNTST_permission_denied;
+-
+     buf->domain = rcu_lock_domain_by_any_id(domid);
+ 
+     if ( !buf->domain )
+@@ -2974,12 +2969,10 @@ static int gnttab_copy_lock_domains(const struct gnttab_copy *op,
+ {
+     int rc;
+ 
+-    rc = gnttab_copy_lock_domain(op->source.domid,
+-                                 op->flags & GNTCOPY_source_gref, src);
++    rc = gnttab_copy_lock_domain(op->source.domid, src);
+     if ( rc < 0 )
+         goto error;
+-    rc = gnttab_copy_lock_domain(op->dest.domid,
+-                                 op->flags & GNTCOPY_dest_gref, dest);
++    rc = gnttab_copy_lock_domain(op->dest.domid, dest);
+     if ( rc < 0 )
+         goto error;
+ 
+@@ -3042,6 +3035,9 @@ static int gnttab_copy_claim_buf(const struct gnttab_copy *op,
+         buf->ptr.u.ref = ptr->u.ref;
+         buf->have_grant = 1;
+     }
++    /* Only DOMID_SELF may reference via frame. */
++    else if ( ptr->domid != DOMID_SELF )
++        return GNTST_permission_denied;
+     else
+     {
+         rc = get_paged_frame(ptr->u.gmfn, &buf->mfn, &buf->page,

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-05 21:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 21:42 [rpms/xen] f43: arbitrary read/write via grant copy Michael Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox