Page MenuHomeFreeBSD

Fix AT_EXECPATH for direct exec mode.
ClosedPublic

Authored by kib on Dec 20 2019, 10:12 PM.
Tags
None
Referenced Files
F176163599: D22894.id65874.diff
Fri, Oct 16, 2:39 PM
F176163021: D22894.id66275.diff
Fri, Oct 16, 2:35 PM
F176162865: D22894.id65889.diff
Fri, Oct 16, 2:33 PM
Unknown Object (File)
Tue, Oct 13, 5:10 PM
Unknown Object (File)
Tue, Sep 29, 1:48 AM
Unknown Object (File)
Mon, Sep 28, 7:58 PM
Unknown Object (File)
Fri, Sep 25, 11:19 PM
Unknown Object (File)
Sun, Sep 20, 6:25 PM
Subscribers

Details

Summary

The somewhat problematic case is when the executable path is relative and either $PATH use is not enabled or it contains '/' so $PATH search is not performed. In this case AT_EXECPATH is relative, I might fix this later.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 28271

Event Timeline

libexec/rtld-elf/rtld.c
510

Testing has shown that aux_info[AT_EXECPATH] is not guaranteed to be non-NULL

kib marked an inline comment as done.

Handle a case when AT_EXECPATH is not present in auxv.
Add XXX comments.

Remove pointless reassignment.

This revision is now accepted and ready to land.Jan 2 2020, 5:13 PM
This revision was automatically updated to reflect the committed changes.