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:	Fri, 01 May 2009 01:44:34 +0100
From:	David Howells <dhowells@...hat.com>
To:	Roland McGrath <roland@...hat.com>
Cc:	dhowells@...hat.com, Oleg Nesterov <oleg@...hat.com>,
	Eric Paris <eparis@...isplace.org>,
	James Morris <jmorris@...ei.org>,
	Stephen Smalley <sds@...ho.nsa.gov>,
	linux-kernel@...r.kernel.org
Subject: Re: Q: selinux_bprm_committed_creds() && signals/do_wait

Roland McGrath <roland@...hat.com> wrote:

> There is a wrinkle here I don't like.  The fatal signal is "committed to"
> (sender approved by security modules, etc.) "before" the exec, but gets
> delivered "after" the exec.

That's because the signal is delivered between the system call function
returning to entry.S and userspace resuming.  We could put a lot of
check...abort clauses in exec.c and the binfmts, but is it worth the hassle?

> I don't understand why install_exec_creds() is called as late as it is.
> Can't we do that in flush_old_exec()--you know, where it says:
> 	/* install the new credentials */
> ?

I believe it's something to do with the binfmt driver needing to access files
in the old security context between calling flush_old_exec() and calling
install_exec_creds() [compute_creds() as was].  It can't do some of the
accesses before calling flush_old_exec() because it has to do funky things
with mmap().

Actually, that comment should probably be removed.  IIRC, at one time I was
trying to set all the credentials there, but was told I couldn't do that.

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