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: <ff13bc9a1003261406w7bf4bb77sf57edce14f0dcc73@mail.gmail.com>
Date:	Fri, 26 Mar 2010 22:06:31 +0100
From:	Luca Barbieri <luca.barbieri@...il.com>
To:	Ulrich Drepper <drepper@...il.com>
Cc:	Olaf van der Spek <olafvdspek@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: execve() returns ENOENT when ld-linux.so isn't found

>> None of these perfectly fit, but EINVAL seems the closest.
>
> No.  ENOENT is the right value.

Not according to POSIX 2008, which does not explicitly specify this case.

Again, it says:
[ENOENT]
    A component of <i>path</i> or <i>file</i> does not name an
existing file or <i>path</i> or <i>file</i> is an empty string.

Here "path" and "file" refer to the argument to the C function and
"component" refers to the tokens obtained after splitting using "/" as
a separator.
POSIX 2008 doesn't talk at all about dependencies of the executables.

POSIX 2008 mandates EINVAL if you interpret "executable format" as
being "ELF executable with interpreter /lib/FOO" as opposed to just
"ELF", or if you interpret "architecture" as including the ELF
interpreter name in addition to the machine type.

By the way, is there any way to do this in the shell other than
including an ELF parser or assuming the ELF interpreter is missing if
the kernel returns ENOENT but the file exists and has an ELF
signature? (both of these solutions seem quite unsatisfactory)
--
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