This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/13134] New: posix_spawn() invokes sh on unknown executable image types


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]