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:	Wed, 15 Aug 2012 15:45:20 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Jiri Kosina <jkosina@...e.cz>
Cc:	Haavard Skinnemoen <hskinnemoen@...il.com>,
	Hans-Christian Egtvedt <egtvedt@...fundet.no>,
	Mike Frysinger <vapier@...too.org>,
	Mark Salter <msalter@...hat.com>,
	Mikael Starvik <starvik@...s.com>,
	Jesper Nilsson <jesper.nilsson@...s.com>,
	David Howells <dhowells@...hat.com>,
	Yoshinori Sato <ysato@...rs.sourceforge.jp>,
	Richard Kuo <rkuo@...eaurora.org>,
	Hirokazu Takata <takata@...ux-m32r.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Michal Simek <monstr@...str.eu>,
	Koichi Yasutake <yasutake.koichi@...panasonic.com>,
	Jonas Bonn <jonas@...thpole.se>,
	Chen Liqin <liqin.chen@...plusct.com>,
	Lennox Wu <lennox.wu@...il.com>,
	Paul Mundt <lethal@...ux-sh.org>,
	"David S. Miller" <davem@...emloft.net>,
	Chris Zankel <chris@...kel.net>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [RFC] cross-arch: don't corrupt personality flags upon
 exec()

On Mon, 13 Aug 2012 15:19:40 +0200 (CEST)
Jiri Kosina <jkosina@...e.cz> wrote:

> On Fri, 3 Aug 2012, Jiri Kosina wrote:
> 
> > Historically, the top three bytes of personality have been used for things 
> > such as ADDR_NO_RANDOMIZE, which made sense only for specific 
> > architectures.
> > 
> > We now, however, have a flag there that is general no matter the 
> > architecture (UNAME26); generally we have to be careful to preserve the 
> > personality flags across exec().
> > 
> > This patch tries to fix all architectures that forcefully overwrite
> > personality flags during exec() (ppc32 and s390 have been fixed recently 
> > by commits f9783ec86 and 59e4c3a2f in a similar way already).
> > 
> > Signed-off-by: Jiri Kosina <jkosina@...e.cz>
> > ---
> > 
> > Untested, as I don't own the hardware.
> 
> Ping, Acks, Nacks, anyone?

Silence means "I'll fix it if you broke it" ;)

> Andrew, if noone has any objections, I guess this should perhaps go 
> through -mm.

Sure.  But..


> > --- a/arch/blackfin/include/asm/elf.h
> > +++ b/arch/blackfin/include/asm/elf.h
> > @@ -132,6 +132,7 @@ do {											\
> >  
> >  #define ELF_PLATFORM  (NULL)
> >  
> > -#define SET_PERSONALITY(ex) set_personality(PER_LINUX)
> > +#define SET_PERSONALITY(ex) \
> > +	set_personality(PER_LINUX | (current->personality & (~PER_MASK)))

This is repeated soooo many times.  Could we not just delete it and, in
include/linux/elf.h, do:

#ifndef SET_PERSONALITY
<that stuff>
#endif

?

If any SET_PERSONALITY-using code is including asm/elf.h directly then
it will reliably break and will get fixed.

Extra marks will be awarded if you can work out whether to use
PER_LINUX_32BIT ;)

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