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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 4 Apr 2022 11:18:42 -0700
From:   Kees Cook <keescook@...omium.org>
To:     David Laight <David.Laight@...lab.com>
Cc:     "'Maciej W. Rozycki'" <macro@...am.me.uk>,
        James Jones <linux@...innocuous.com>,
        "bp@...en8.de" <bp@...en8.de>, "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: Remove a.out support

On Mon, Apr 04, 2022 at 05:07:11PM +0000, David Laight wrote:
> From: Maciej W. Rozycki
> > Sent: 04 April 2022 12:04
> > 
> > On Sat, 2 Apr 2022, Kees Cook wrote:
> > 
> > > > Chiming in late as I'm scanning outstanding mailing list traffic: if this
> > > >is as you say all statically linked stuff, then converting from a.out to
> > > >ELF might be as easy as:
> > > >
> > > >$ objcopy -I a.out-i386-linux -O elf32-i386 a.out-binary elf-binary
> > >
> > > Based on my research (and the wrapper I ended up writing), I don't think
> > > this is sufficient because entry point handling is different between ELF
> > > and a.out (specifically the stack layout and initial sp register value).
> > 
> >  Fair enough.  I guess the exact value of %esp doesn't matter that much
> > (why would it?), but the arguments and environment may well be structured
> > differently (and indeed based on a glance over binfmt_aout.c there's extra
> > indirection involved compared to the ELF i386 psABI).
> 
> You could write a custom 'elf interpreter'.
> Hacking at those isn't for the faint-hearted :-)

A thread on LWN pointed to:
https://github.com/siegfriedpammer/run-aout
which appears to be a much more complete a.out wrapper.

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ