Subject: bug#52671: closed (Re: bug#52693: [PATCH] gnu: glibc: Handle failure to find $ORIGIN.)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 29 Jan 2023 23:35:02 +0000

Your bug report

#52671: glibc patch causes crash on failure to find path to executable

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
52671: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52671
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#52693: [PATCH] gnu: glibc: Handle failure to find $ORIGIN.
From: Ludovic Courtès <[email-masked]>
To: Ivan Kozlov <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Mon, 30 Jan 2023 00:34:40 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Ivan,

Ivan Kozlov <[email-masked]> skribis:

> Fixes <https://issues.guix.gnu.org/52671>.
>
> * 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’.

¹ https://issues.guix.gnu.org/61156

Subject: glibc patch causes crash on failure to find path to executable
From: Ivan Kozlov <[email-masked]>
To: [email-masked]
Date: Mon, 20 Dec 2021 01:14:38 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

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.