Bug#658278: ld.so segfaults on wrong input
- To: control@bugs.debian.org
- Cc: 658278@bugs.debian.org
- Subject: Bug#658278: ld.so segfaults on wrong input
- From: Goswin von Brederlow <goswin-v-b@web.de>
- Date: Wed, 08 Feb 2012 11:02:12 +0100
- Message-id: <87ty31ej8b.fsf@frosties.localnet>
- Reply-to: Goswin von Brederlow <goswin-v-b@web.de>, 658278@bugs.debian.org
- In-reply-to: <20120201220041.GD2817@hall.aurel32.net> (Aurelien Jarno's message of "Wed, 1 Feb 2012 23:00:41 +0100")
- References: <20120201184729.7158.97119.reportbug@frosties.localnet> <20120201220041.GD2817@hall.aurel32.net>
reopen 658278
thanks
Aurelien Jarno <aurelien@aurel32.net> writes:
> On Wed, Feb 01, 2012 at 07:47:29PM +0100, Goswin von Brederlow wrote:
>> Package: libc6
>> Version: 2.13-21
>> Severity: normal
>> File: /lib64/ld-linux-x86-64.so.2
>>
>> Running ld.so with the wrong kind of file segfaults:
>>
>> mrvn@frosties:~% /lib64/ld-linux-x86-64.so.2 /usr/lib/klibc/bin/ls
>> zsh: segmentation fault /lib64/ld-linux-x86-64.so.2 /usr/lib/klibc/bin/ls
>>
>
> It's not the wrong file type:
>
> $file /usr/lib/klibc/bin/ls
> /usr/lib/klibc/bin/ls: ELF 64-bit LSB executable, x86-64, version 1
> (SYSV), statically linked (uses shared libs), stripped
>
> It's an ELF file, but given it has a different ABI just doesn't work
> with /lib64/ld-linux-x86-64.so.2. It's hardly the fault of the libc.
It has a different interpreter in its elf section. Ld.so could check
that to determine wether the elf file is one it should care about.
A segfault is never correct behaviour and needs to be fixed in ld.so.
MfG
Goswin
Reply to: