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: <20120912011654.GQ13973@ZenIV.linux.org.uk>
Date:	Wed, 12 Sep 2012 02:16:54 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Meredydd Luff <meredydd@...atehouse.org>
Cc:	linux-kernel@...r.kernel.org, "H. Peter Anvin" <hpa@...or.com>,
	Kees Cook <keescook@...omium.org>,
	Ingo Molnar <mingo@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH signal#execve2] syscalls,x86: Add execveat() system call
 (v3)

On Wed, Sep 12, 2012 at 01:55:52AM +0100, Meredydd Luff wrote:
> Al (in particular): I've reworked this on top of your generic
> execve() changes, as well as incorporating feedback from HPA.
> Could you take another look please (and merge if all is well)?
> 
> [v3: now rebased onto signal.git#execve2, and takes a flags
> parameter which understands AT_SYMLINK_NOFOLLOW; all thanks to
> feedback from https://lkml.org/lkml/2012/8/1/418]
> 
> HPA is already on record calling for an execveat() which also does
> fexecve()'s job: https://lkml.org/lkml/2006/7/11/556.
> And the current glibc hack for fexecve() is already causing problems
> in the wild. Eg: https://bugzilla.redhat.com/show_bug.cgi?id=241609,
> https://lkml.org/lkml/2006/12/27/123, and as recounted at
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514043.

Please, declare open_execat(), leaving open_exec() as it is (i.e. a
trivial wrapper for open_execat()).  Would cut down on the patch
footprint a bit...

> +	bprm->filename = filename ?:
> +			(const char *) file->f_path.dentry->d_name.name;

Absolutely not.  If nothing else, ->d_name can change on rename() *and*
get underlying memory freed.  At zero notice.
--
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