public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/13134] New: posix_spawn() invokes sh on unknown executable image types
@ 2011-08-25 20:46 shea at shealevy dot com
  2011-08-25 20:46 ` [Bug libc/13134] " shea at shealevy dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: shea at shealevy dot com @ 2011-08-25 20:46 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-12-26 15:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25 20:46 [Bug libc/13134] New: posix_spawn() invokes sh on unknown executable image types shea at shealevy dot com
2011-08-25 20:46 ` [Bug libc/13134] " shea at shealevy dot com
2011-08-26  6:13 ` bugdal at aerifal dot cx
2011-08-26  8:36 ` shea at shealevy dot com
2011-09-06  0:27 ` drepper.fsp at gmail dot com
2011-09-06  0:38 ` shea at shealevy dot com
2014-06-27 12:15 ` fweimer at redhat dot com
2020-12-26 15:59 ` bruno at clisp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).