#1000449 Missing ELF interpreter for debug files causes 'readelf' error

Package:
binutils
Source:
binutils
Description:
GNU assembler, linker and binary utilities
Submitter:
Felix Lechner
Date:
2022-05-30 14:33:04 UTC
Severity:
important
#1000449#5
Date:
2021-11-23 11:29:24 UTC
From:
To:
Hi,

Readelf in sid produces parsing errors about missing interpreters for
ELF files presumably containing only debugging information. While
having an interpreter may not make sense for debugging files, Readelf
should not complain with an error:

In Lintian's test suite, in
t/recipes/checks/binaries/corrupted/legacy-debug: [1]

hello-dbg (binary): elf-error In program headers: Unable to find
program interpreter name [usr/lib/debug/usr/bin/hello]
hello (binary): elf-error In program headers: Unable to find program
interpreter name [usr/bin/hello.dbg]

I filed this bug because the error does not occur in Bullseye
(stable). It is possible that Readelf in sid simply changed how it
reports the condition. Any advice from your side would be welcome.

As a stop gap, Lintian will accept the ELF error as valid but enables
the test only for newer Binutils (>= 2.37.50.20211102). Thanks!

Kind regards
Felix Lechner

[1] https://salsa.debian.org/lintian/lintian/-/blob/master/t/recipes/checks/binaries/corrupted/legacy-debug/build-spec/debian/rules

#1000449#12
Date:
2021-11-28 12:27:33 UTC
From:
To:
always fix the issue:

[47/5029]mh@salida:~/packages/aide/build-area $ lintian --pedantic --info --no-tag-display-limit --suppress-tags update-debian-copyright *.changesN:
W: aide-dbgsym: elf-error In program headers: Unable to find program interpreter name [usr/lib/debug/.build-id/ad/00b299e8f67a4c4aac440f4a3ec5005901d370.debug]
N:
N:   The file appears to be in ELF format but readelf produced the indicated error when parsing it.
N:
N:   In case of a false positive, you may need to install binutils-multiarch so that ELF files from other architectures are handled correctly. It
N:   is also possible that the file is not actually in ELF format but was misidentified as such.
N:
N:   Please refer to https://refspecs.linuxfoundation.org/elf/elf.pdf and the readelf(1) manual page for details.
N:
N:   Visibility: warning
N:   Show-Always: no
N:   Check: binaries/corrupted
N:   Renamed from: apparently-corrupted-elf-binary
N:
[48/5030]mh@salida:~/packages/aide/build-area $ sudo apt install binutils-x86-64-linux-gnu/experimental libctf0/experimental binutils/experimental
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
binutils is already the newest version (2.37.50.20211118-1).
binutils-x86-64-linux-gnu is already the newest version (2.37.50.20211118-1).
libctf0 is already the newest version (2.37.50.20211118-1).
Selected version '2.37.50.20211118-1' (Debian:experimental [amd64]) for 'binutils-x86-64-linux-gnu'
Selected version '2.37.50.20211118-1' (Debian:experimental [amd64]) for 'libctf0'
Selected version '2.37.50.20211118-1' (Debian:experimental [amd64]) for 'binutils'
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[49/5031]mh@salida:~/packages/aide/build-area $ readelf --version
GNU readelf (GNU Binutils for Debian) 2.37.50.20211118
Copyright (C) 2021 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

#1000449#17
Date:
2021-11-28 12:33:09 UTC
From:
To:
Hi Marc,

Yeah, I raised the question with the right folks. [1] Please feel free
to chime in.

Kind regards
Felix Lechner

[1] https://bugs.debian.org/1000449