glibc patch causes crash on failure to find path to executable

  • Done
  • quality assurance status badge
Details
2 participants
  • Ivan Kozlov
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ivan Kozlov
Severity
important
I
I
Ivan Kozlov wrote on 19 Dec 2021 23:14
(address . bug-guix@gnu.org)
84771639950622@mail.yandex.ru
glibc-dl-cache.patch causes segmentation fault when _dl_get_origin fails (which should be harmless unless there is $ORIGIN in RUNPATH). I found this when running a dynamically linked executable as ‘init’, before /proc was mounted. There needs to be an origin != (char *)-1 check.
L
L
Ludovic Courtès wrote on 20 Dec 2021 22:38
(name . Ivan Kozlov)(address . kanichos@yandex.ru)(address . 52671@debbugs.gnu.org)
87y24fdkj4.fsf@gnu.org
Hi,

Ivan Kozlov <kanichos@yandex.ru> skribis:

Toggle quote (2 lines)
> glibc-dl-cache.patch causes segmentation fault when _dl_get_origin fails (which should be harmless unless there is $ORIGIN in RUNPATH). I found this when running a dynamically linked executable as ‘init’, before /proc was mounted. There needs to be an origin != (char *)-1 check.

Ouch. Would you like to send a patch against glibc-dl-cache.patch?

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 20 Dec 2021 22:37
control message for bug #52671
(address . control@debbugs.gnu.org)
8735mnez4a.fsf@gnu.org
severity 52671 important
quit
I
I
Ivan Kozlov wrote on 12 Jan 2022 23:04
Re:bug#52671: glibc patch causes crash on failure to find path to executable
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 52671@debbugs.gnu.org)
3379791642025074@iva1-e3ac85a63903.qloud-c.yandex.net
L
L
Ludovic Courtès wrote on 30 Jan 2023 00:34
Re: bug#52693: [PATCH] gnu: glibc: Handle failure to find $ORIGIN.
(name . Ivan Kozlov)(address . kanichos@yandex.ru)
878rhk3ofj.fsf@gnu.org
Hi Ivan,

Ivan Kozlov <kanichos@yandex.ru> skribis:

Toggle quote (4 lines)
>
> * gnu/packages/patches/glibc-dl-cache.patch: Check pointer returned by '_dl_get_origin' for failure indication.

Somehow we forgot about this patch for a whole year, and it turns out I
stumbled upon the bug again just hours ago¹.

Now pushed to ‘core-updates’ as
edb8c09addd186d9538d43b12af74d6c7aeea082.

Thanks again, and apologies for the delay!

Ludo’.

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 52671@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 52671
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch