public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/26151] New: Add ET_* markers for debug files, and enhance ldd (ld.so) to use them.
@ 2020-06-22 15:19 carlos at redhat dot com
  2020-06-22 15:30 ` [Bug dynamic-link/26151] " carlos at redhat dot com
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: carlos at redhat dot com @ 2020-06-22 15:19 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=26151

            Bug ID: 26151
           Summary: Add ET_* markers for debug files, and enhance ldd
                    (ld.so) to use them.
           Product: glibc
           Version: 2.32
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: carlos at redhat dot com
  Target Milestone: ---

Users use ldd to process directories full of files.

In some cases ldd is used to process what appear to be ELF files.

These ELF files are actually debuginfo objects that are only intended to be
used with debuggers.

The implementation of debuginfo objects is missing clear identification
information because it does not allow for the easy disambiguation of these ELF
files as debuginfo. When ldd is run on these objects files the corrupt and
invalid ELF data leads to crashes in ldd as it considers the objects to be
valid ELF files (they contain valid ELF headers).

There are a few solutions to this problem:

(a) Duplicate in ldd what eu-elfclassify does. In an attempt to create a robust
identification tooling for object files Mark Wielaard and Florian Weimer
created eu-elfclassify. This solution is conceptually wrong for ldd which
should need to look at section headers, but would need to in order to duplicate
what eu-elfclassify does.

(b) Add ET_* markup for debuginfo files to clearly mark them as debuginfo files
and avoid the problem by teaching the downstream tools, ldd first, that such
files are not be loaded or handled like normal ELF files. From an ELF
perspective they are invalid and incomplete and must be parsed with different
kinds of rules than normal ELF files.

My preferred solution is (b), but doing that may take a long time to deploy.

The short-term alternative is (a) followed eventually by (b) to remove the
section header processing at a later date.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-07-07  8:17 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22 15:19 [Bug dynamic-link/26151] New: Add ET_* markers for debug files, and enhance ldd (ld.so) to use them carlos at redhat dot com
2020-06-22 15:30 ` [Bug dynamic-link/26151] " carlos at redhat dot com
2020-06-22 15:34 ` carlos at redhat dot com
2020-06-22 15:35 ` carlos at redhat dot com
2020-06-22 15:39 ` carlos at redhat dot com
2020-06-22 15:42 ` mark at klomp dot org
2020-06-22 20:29 ` hjl.tools at gmail dot com
2020-06-22 20:53 ` carlos at redhat dot com
2020-06-22 21:12 ` hjl.tools at gmail dot com
2020-06-23 12:44 ` carlos at redhat dot com
2020-06-23 12:46 ` carlos at redhat dot com
2020-06-23 12:54 ` hjl.tools at gmail dot com
2020-06-23 15:20 ` carlos at redhat dot com
2020-06-23 16:08 ` hjl.tools at gmail dot com
2020-06-26 16:08 ` carlos at redhat dot com
2020-06-26 16:18 ` hjl.tools at gmail dot com
2020-07-07  8:17 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).