lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 10 Feb 2008 16:31:10 +0100
From:	"Oliver Pinter" <oliver.pntr@...il.com>
To:	"Bastian Blank" <bastian@...di.eu.org>,
	"Pekka J Enberg" <penberg@...helsinki.fi>,
	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	stable@...nel.org, jens.axboe@...cle.com,
	akpm@...ux-foundation.org, ndenev@...il.com, oliver.pntr@...il.com
Subject: Re: [PATCH] splice: fix user pointer access in get_iovec_page_array()

Signed-off-by: Oliver Pinter <oliver.pntr@...il.com>

----8<----

Linux pancs 2.6.22.17-opt2-cve2 #1 SMP Sun Feb 10 16:22:37 CET 2008
i686 GNU/Linux
-----------------------------------
 Linux vmsplice Local Root Exploit
 By qaaz
-----------------------------------
[+] mmap: 0x0 .. 0x1000
[+] page: 0x0
[+] page: 0x20
[+] mmap: 0x4000 .. 0x5000
[+] page: 0x4000
[+] page: 0x4020
[+] mmap: 0x1000 .. 0x2000
[+] page: 0x1000
[+] mmap: 0xb7f2d000 .. 0xb7f5f000
[-] vmsplice: Bad address

-----

oliver@...cs:/tmp$ uname -a && ./2623_2624_root_exploit
Linux pancs 2.6.22.17-opt2-cve2 #1 SMP Sun Feb 10 16:22:37 CET 2008
i686 GNU/Linux
-----------------------------------
 Linux vmsplice Local Root Exploit
 By qaaz
-----------------------------------
[+] addr: 0xc01112e9
[-] wtf


---->8----
On 2/10/08, Bastian Blank <bastian@...di.eu.org> wrote:
> On Sun, Feb 10, 2008 at 04:47:57PM +0200, Pekka J Enberg wrote:
> > From: Bastian Blank <bastian@...di.eu.org>
> >
> > The commit 8811930dc74a503415b35c4a79d14fb0b408a361 ("splice: missing user
> > pointer access verification") added access_ok() to
> copy_from_user_mmap_sem()
> > which only 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 close the local root exploit.
> >
> > Cc: <stable@...nel.org>
> > Cc: Jens Axboe <jens.axboe@...cle.com>
> > Cc: Andrew Morton <akpm@...ux-foundation.org>
> > Signed-off-by: Pekka Enberg <penberg@...helsinki.fi>
> Signed-off-by: Bastian Blank <waldi@...ian.org>
>
> > Index: linux-2.6/fs/splice.c
> > ===================================================================
> > --- linux-2.6.orig/fs/splice.c
> > +++ linux-2.6/fs/splice.c
> > @@ -1237,6 +1237,9 @@ static int get_iovec_page_array(const st
> >  		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.
>
> --
> Those who hate and fight must stop themselves -- otherwise it is not
> stopped.
> 		-- Spock, "Day of the Dove", stardate unknown
>


-- 
Thanks,
Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ