| jayjwa |
02-11-2008 04:52 AM |
CVE-2008-0009/0010/0600 (Linux Privilege Escalation Vulnerabilities)
2.6.24.1 (as of this date, 2008-02-08 15:25 patch-2.6.24.1.bz2 ) may not fully close this hole. The post before this is from Feb. 08. This is dated Feb. 10.
Code:
From: Bastian Blank <bastian@waldi.eu.org>
Date: Sun, 10 Feb 2008 14:47:57 +0000 (+0200)
Subject: splice: fix user pointer access in get_iovec_page_array()
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=712a30e63c8066ed84385b12edbfb804f49cbc44
splice: fix user pointer access in get_iovec_page_array()
Commit 8811930dc74a503415b35c4a79d14fb0b408a361 ("splice: missing user pointer access verification") added the proper access_ok() calls to copy_from_user_mmap_sem() which ensures we can copy the struct iovecs from userspace to the kernel.
But we also must check whether we can access the actual memory region pointed to by the struct iovec to fix the access checks properly.
Signed-off-by: Bastian Blank <waldi@debian.org>
Acked-by: Oliver Pinter <oliver.pntr@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
diff --git a/fs/splice.c b/fs/splice.c
index 14e2262..9b559ee 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1234,7 +1234,7 @@ static int get_iovec_page_array(const struct iovec __user *iov,
if (unlikely(!len))
break;
error = -EFAULT;
- if (unlikely(!base))
+ if (!access_ok(VERIFY_READ, base, len))
break;
/*
That's the info I found, if someone knows more/better, please post. See the discussion:
http://marc.info/?l=linux-kernel&m=120262352612128&w=2 (Threading breaks, probably from posting with a bad email client)
http://lkml.org/lkml/2008/2/10/8 (Proper threading of articles)
|