[PATCH] elf: Ignore LD_PROFILE if LD_PROFILE_OUTPUT is not set (bug 33797)
Sam James
sam@gentoo.org
Sat Jan 17 13:57:15 GMT 2026
Florian Weimer <fw@deneb.enyo.de> writes:
> * 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.
I don't think we'd want to backport XDG support anyway, so it should be
done separately if at all.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 418 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260117/c97b74d9/attachment.sig>
More information about the Libc-alpha
mailing list