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:	Sat, 27 Mar 2010 15:51:52 +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

> That argumentation is bogus.  You wrote yourself, this situation isn't
> (and cannot) be described in POSIX.  For such cases the any error
> value is consistent with POSIX.

Sure, but that means POSIX also does not forbid changing it.

> Again: any value is as good as any other.  The existing value works
> and changing it breaks existing code.

Yes, this is an argument in favor of leaving it as is.

> Changing the error code alone achieves nothing.

If you were to change it to a new error value, such that
strerror(errno) == "unable to open ELF interpreter" (or similar), that
would just work.

The problem is that would only work after upgrading glibc, and would
probably break the error reporting code in RH shells if only the
kernel is upgraded.

A possibly better option is to add the ability to the kernel to report
extended error strings (was proposed some time ago), and use that.

It's a small issue, but I recently stumbled on it when running an x86
binary on an x86-64 machine lacking the compat libraries, and it's
quite suprising at first to have the shell claim the file does not
exist when it clearly does (and would be even more so for people who
don't know anything about executables or ELF).

The idea of parsing the ELF file in the shell seems quite ugly, since
you need to add a non-trivial piece of code at least to all shells and
all graphical file managers.
glibc itself could conceivably provide functions to do that
(strerror_for_exec* or exec*_with_extended_error ?).
--
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