[PATCH] elf: Ignore LD_PROFILE if LD_PROFILE_OUTPUT is not set (bug 33797)

Florian Weimer fw@deneb.enyo.de
Sat Jan 17 13:12:16 GMT 2026


* Cristian Rodriguez:

> On Fri, Jan 16, 2026 at 9:03 PM Florian Weimer <fweimer@redhat.com> wrote:
>>
>> * Carlos O'Donell:
>>
>> > On 1/15/26 5:24 PM, Florian Weimer wrote:
>> >> The previous default for LD_PROFILE_OUTPUT, /var/tmp, is insecure
>> >> because it's typically a 1777 directory, and other systems could
>> >> place malicious files there which interfere with execution.
>> >
>> > Correct. This is an accident waiting to happen, even if we marked
>> > bug 33797 as security- it is dangerous.
>> >
>> >> Requiring the user to specify a profiling directory mitigates
>> >> the impact of bug 33797.  Clear LD_PROFILE_OUTPUT alongside
>> >> with LD_PROFILE.
>
> That's why we have $XDG_DATA_DIR or XDG_STATE_HOME ...why not use that if set?

Directly, or a subdirectory of it?

Either way, I'm not sure if this is a good idea because we cannot
realistically implement the rest of the specification in the dynamic
linker.


More information about the Libc-alpha mailing list