Proposed patch for RHEL5 from Al Viro
diff -urN linux-2.6.18.x86_64/fs/splice.c linux-2.6.18.x86_64-fix/fs/splice.c --- linux-2.6.18.x86_64/fs/splice.c 2008-02-10 11:08:19.000000000 -0500 +++ linux-2.6.18.x86_64-fix/fs/splice.c 2008-02-10 11:31:06.000000000 -0500 @@ -1154,6 +1154,9 @@ 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.
Proposed patch for RHEL5 from Al Viro
diff -urN linux-2. 6.18.x86_ 64/fs/splice. c linux-2. 6.18.x86_ 64-fix/ fs/splice. c 6.18.x86_ 64/fs/splice. c 2008-02-10 11:08:19.000000000 -0500 6.18.x86_ 64-fix/ fs/splice. c 2008-02-10 11:31:06.000000000 -0500
break;
--- linux-2.
+++ linux-2.
@@ -1154,6 +1154,9 @@
if (unlikely(!base))
+ if (unlikely( !access_ ok(VERIFY_ READ, base, len)))
+ break;
+
/*
* Get this base offset and number of pages, then map
* in the user pages.