]> xenbits.xensource.com Git - xen.git/commitdiff
compat/gnttab: Prevent infinite loop in compat code stable-4.0 staging-4.0
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 14 Nov 2012 11:46:35 +0000 (11:46 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 14 Nov 2012 11:46:35 +0000 (11:46 +0000)
c/s 20281:95ea2052b41b, which introduces Grant Table version 2
hypercalls introduces a vulnerability whereby the compat hypercall
handler can fall into an infinite loop.

If the watchdog is enabled, Xen will die after the timeout.

This is a security problem, XSA-24 / CVE-2012-4539.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-unstable changeset: 26151:b64a7d868f06
Backport-requested-by: security@xen.org
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen/common/compat/grant_table.c

index ca60395f0add3a98e9230f89e4a5b8988e6d86e9..d09a65b61505755d4f1bc1594a8c99f853507a3a 100644 (file)
@@ -310,6 +310,8 @@ int compat_grant_table_op(unsigned int cmd,
 #undef XLAT_gnttab_get_status_frames_HNDL_frame_list
                 if ( unlikely(__copy_to_guest(cmp_uop, &cmp.get_status, 1)) )
                     rc = -EFAULT;
+                else
+                    i = 1;
             }
             break;
         }