public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/28648] New: Running ld.so on statically linked binaries crashes
@ 2021-12-04 15:46 fweimer at redhat dot com
  2021-12-05 10:32 ` [Bug dynamic-link/28648] " fweimer at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: fweimer at redhat dot com @ 2021-12-04 15:46 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 28648
           Summary: Running ld.so on statically linked binaries crashes
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---

Various bugs cause ld.so to crash on binaries with no dynamic segment or no
program interpreter.

If there is no dynamic segment, extracting audit data in
audit_list_add_dynamic_tag crashes.

If the binary has a dynamic segment and uses RELRO, it crashes because RELRO
has already been applied to it once its own startup code runs.

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

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

* [Bug dynamic-link/28648] Running ld.so on statically linked binaries crashes
  2021-12-04 15:46 [Bug dynamic-link/28648] New: Running ld.so on statically linked binaries crashes fweimer at redhat dot com
@ 2021-12-05 10:32 ` fweimer at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: fweimer at redhat dot com @ 2021-12-05 10:32 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |2.35
         Resolution|---                         |FIXED
           Assignee|unassigned at sourceware dot org   |fweimer at redhat dot com
                 CC|                            |fweimer at redhat dot com

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for 2.35 by:

commit c1cb2deeca1a85c6fc5bd41b90816d48a95bc434
Author: Florian Weimer <fweimer@redhat.com>
Date:   Sun Dec 5 11:28:34 2021 +0100

    elf: execve statically linked programs instead of crashing [BZ #28648]

    Programs without dynamic dependencies and without a program
    interpreter are now run via execve.

    Previously, the dynamic linker either crashed while attempting to
    read a non-existing dynamic segment (looking for DT_AUDIT/DT_DEPAUDIT
    data), or the self-relocated in the static PIE executable crashed
    because the outer dynamic linker had already applied RELRO protection.

    <dl-execve.h> is needed because execve is not available in the
    dynamic loader on Hurd.

    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

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

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

end of thread, other threads:[~2021-12-05 10:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-04 15:46 [Bug dynamic-link/28648] New: Running ld.so on statically linked binaries crashes fweimer at redhat dot com
2021-12-05 10:32 ` [Bug dynamic-link/28648] " 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).