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]
Message-ID: <CALCETrW0pqGznCOEoFT3ttEkmqNmpZVaNu-FPb=RUB3D7k+aQg@mail.gmail.com>
Date:	Sun, 26 Oct 2014 10:36:45 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Al Viro <viro@...iv.linux.org.uk>
Cc:	Richard Weinberger <richard.weinberger@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Kees Cook <keescook@...omium.org>,
	linux-arch <linux-arch@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] all arches, signal: Move restart_block to struct task_struct

On Sun, Oct 26, 2014 at 10:18 AM, Al Viro <viro@...iv.linux.org.uk> wrote:
> On Sun, Oct 26, 2014 at 10:02:16AM -0700, Andy Lutomirski wrote:
>> If an attacker can cause a controlled kernel stack overflow,
>> overwriting the restart block is a very juicy exploit target.
>> Moving the restart block to struct task_struct prevents this type of
>> exploit.
>
> The hell it does.  In a _lot_ of cases current is current_thread_info()->task,
> which makes your variant just as vulnerable, in addition to being (slightly)
> more costly.

I never said it was the *only* juicy target, but we can fix the rest,
too.  Also, I suspect that overwriting task could be harder to
exploit.  First, you need to avoid crashing, and second, on systems
with SMAP or similar protection, you need to make task point somewhere
that contains a useful exploit payload.

We could probably get rid of thread_info's task pointer on x86, too --
it's not used by get_current() any more.

--Andy
--
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