[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120924185119.GI16532@moon>
Date: Mon, 24 Sep 2012 22:51:19 +0400
From: Cyrill Gorcunov <gorcunov@...nvz.org>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Mark Salter <msalter@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Russell King <rmk@....linux.org.uk>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Kees Cook <keescook@...omium.org>,
linux-kernel@...r.kernel.org,
Linux-Arch <linux-arch@...r.kernel.org>,
Heiko Carstens <heiko.carstens@...ibm.com>,
"H. Peter Anvin" <hpa@...or.com>,
Pavel Emelyanov <xemul@...allels.com>
Subject: Re: sys_kcmp
On Mon, Sep 24, 2012 at 11:29:09AM -0700, Eric W. Biederman wrote:
> >
> > +#ifdef CONFIG_MMU
> > if (addr >= TASK_SIZE || addr < mmap_min_addr)
> > +#else
> > + if (addr >= TASK_SIZE)
> > +#endif
>
> I expect what you want is a call to access_ok, rather than hard coding
> details about task layout here. This test certainly looks wrong
> for a 32bit process on a 64bit kernel. If I read your test right it
> appears I can set values of say 0x100000000 on a 32bit process...
>
> As for mmap_min_addr I would expect your find_vma check would make that
> test unnecessary, simply by not finding a vma...
Good point, Eric, thanks! I'm cooking a new patch now.
--
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