Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 892521 - >=sys-devel/lld mangles RUNPATH in an insecure way if cross-compiled: /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/bin/lldn RPATH: $ORIGIN/../lib64:/usr/aarch64-unknown-linux-gnu/usr/lib/llvm/15/lib64
Summary: >=sys-devel/lld mangles RUNPATH in an insecure way if cross-compiled: /var/tm...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-29 18:55 UTC by tt_1
Modified: 2023-02-04 23:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
compressed build log (lld-cross-aarch64-build.log.gz,10.66 KB, application/gzip)
2023-01-29 18:55 UTC, tt_1
Details
output from emerge --info (aarch64) (emerge-info,5.34 KB, text/plain)
2023-01-29 18:59 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2023-01-29 18:55:31 UTC
Created attachment 849407 [details]
compressed build log

I got this message when I cross-compiled =sys-devel/lld-15.0.7 with the new fix:

>>> Completed installing sys-devel/lld-15.0.7 into /var/tmp/portage/sys-devel/lld-15.0.7/image

 * Final size of build directory: 42072 KiB (41.0 MiB)
 * Final size of installed tree:   7068 KiB ( 6.9 MiB)

Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/bin/lld
Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldWasm.so.15
Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldMinGW.so.15
Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldMachO.so.15
Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldELF.so.15
Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldCOFF.so.15
Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldCommon.so.15

 * QA Notice: The following files contain insecure RUNPATHs
 *  Please file a bug about this at https://bugs.gentoo.org/
 *  with the maintainer of the package.
 *   /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/bin/lldn    RPATH: $ORIGIN/../lib64:/usr/aarch64-unknown-linux-gnu/usr/lib/llvm/15/lib64
 *   /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldWasm.so.15n    RPATH: $ORIGIN/../lib64:/usr/aarch64-unknown-linux-gnu/usr/lib/llvm/15/lib64
 *   /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldMinGW.so.15n    RPATH: $ORIGIN/../lib64:/usr/aarch64-unknown-linux-gnu/usr/lib/llvm/15/lib64
 *   /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldMachO.so.15n    RPATH: $ORIGIN/../lib64:/usr/aarch64-unknown-linux-gnu/usr/lib/llvm/15/lib64
 *   /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldELF.so.15n    RPATH: $ORIGIN/../lib64:/usr/aarch64-unknown-linux-gnu/usr/lib/llvm/15/lib64
 *   /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldCOFF.so.15n    RPATH: $ORIGIN/../lib64:/usr/aarch64-unknown-linux-gnu/usr/lib/llvm/15/lib64
 *   /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldCommon.so.15n    RPATH: $ORIGIN/../lib64:/usr/aarch64-unknown-linux-gnu/usr/lib/llvm/15/lib64
 * 

A native compile of ldd doesn't show these warnings. 

The ebuild does some autofixing, it seems to fail: 

Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/bin/lld
Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldWasm.so.15
Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldMinGW.so.15
Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldMachO.so.15
Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldELF.so.15
Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldCOFF.so.15
Auto fixing rpaths for /var/tmp/portage/sys-devel/lld-15.0.7/image/usr/lib/llvm/15/lib64/liblldCommon.so.15


I failed to learn where this autofixing is defined, propably in one of the eclasses.
Comment 1 tt_1 2023-01-29 18:59:38 UTC
Created attachment 849409 [details]
output from emerge --info (aarch64)