]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
CVE-2008-0600: Fix exploitable hole in vmsplice() syscall. xen-3.2.0
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 11 Feb 2008 11:05:27 +0000 (11:05 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 11 Feb 2008 11:05:27 +0000 (11:05 +0000)
Fix is Al Viro's suggested patch for RHEL5.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
fs/splice.c

index 4eed2f6c8eeb812921a3a047d996da6cb77742f7..0153c97df779c68ffb1f6e788655d3023653b65f 100644 (file)
@@ -1141,6 +1141,9 @@ static int get_iovec_page_array(const struct iovec __user *iov,
                if (unlikely(!base))
                        break;
 
+               if (unlikely(!access_ok(VERIFY_READ, base, len)))
+                       break;
+
                /*
                 * Get this base offset and number of pages, then map
                 * in the user pages.