This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13134] New: posix_spawn() invokes sh on unknown executable image types
- From: "shea at shealevy dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Thu, 25 Aug 2011 20:46:01 +0000
- Subject: [Bug libc/13134] New: posix_spawn() invokes sh on unknown executable image types
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=13134
Bug #: 13134
Summary: posix_spawn() invokes sh on unknown executable image
types
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper.fsp@gmail.com
ReportedBy: shea@shealevy.com
Classification: Unclassified
The current glibc implementation of posix_spawn() invokes /bin/sh if execve
sets errno to ENOEXEC. This is not specified by the POSIX.2004 definition
(http://pubs.opengroup.org/onlinepubs/009695399/functions/posix_spawn.html), is
different from the behavior of the sample implementation in the POSIX.2004
rationale section
(http://pubs.opengroup.org/onlinepubs/009604599/xrat/xsh_chap03.html), and
seems to have the same security risks that system() and popen() do in
set{u,g}id executables. In particular, the Rationale section says "The
effective behavior of a successful invocation of posix_spawn() is as if the
operation were implemented with POSIX operations as follows:", which as I've
said is followed by an implementation that behaves differently than the glibc
posix_spawn(). This appears to be non-compliant behavior.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.