FBGEMM icon indicating copy to clipboard operation
FBGEMM copied to clipboard

Errant rpath in binaries

Open isuruf opened this issue 1 year ago • 1 comments

For eg: there's an rpath /__w/_temp/conda_environment_10143495636/lib.

This can be a security issue if a user has access to /__w, but is not the norm in a normal unix layout

$ readelf -d /home/isuruf/.conda/envs/pytorch-dev/lib/python3.8/site-packages/fbgemm_gpu/fbgemm_gpu_py.so

Dynamic section at offset 0x579705e0 contains 41 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libtorch.so]
 0x0000000000000001 (NEEDED)             Shared library: [libc10.so]
 0x0000000000000001 (NEEDED)             Shared library: [libc10_cuda.so]
 0x0000000000000001 (NEEDED)             Shared library: [libnvidia-ml.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libtorch_cpu.so]
 0x0000000000000001 (NEEDED)             Shared library: [libtorch_cuda.so]
 0x0000000000000001 (NEEDED)             Shared library: [libcudart.so.12]
 0x0000000000000001 (NEEDED)             Shared library: [librt.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [ld-linux-x86-64.so.2]
 0x000000000000000f (RPATH)              Library rpath: [/__w/_temp/conda_environment_10143495636/lib]

isuruf avatar Sep 09 '24 17:09 isuruf

Hi @isuruf thanks for reporting this. We will work to remove this rpath from the binary.

q10 avatar Sep 09 '24 17:09 q10