frida / frida-tools

Frida CLI tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

frida-ps failes with GLIBC_2.28 error launching from ubuntu1804/aarch64/python3.8.10

robertwenquan opened this issue · comments

frida-ps doesn't run on Ubuntu18.04 aarch64 with python 3.8.10

is this not supported on systems with older glibc?

$ frida-ps -U

***
Failed to load the Frida native extension: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /home/ubuntu/.envs/data/lib/python3.8/site-packages/_frida.cpython-38-aarch64-linux-gnu.so)
Please ensure that the extension was compiled for Python 3.x.
***

Traceback (most recent call last):
  File "/home/ubuntu/.envs/data/bin/frida-ps", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/.envs/data/lib/python3.8/site-packages/frida_tools/ps.py", line 8, in main
    from frida_tools.application import ConsoleApplication
  File "/home/ubuntu/.envs/data/lib/python3.8/site-packages/frida_tools/application.py", line 23, in <module>
    import frida
  File "/home/ubuntu/.envs/data/lib/python3.8/site-packages/frida/__init__.py", line 24, in <module>
    raise ex
  File "/home/ubuntu/.envs/data/lib/python3.8/site-packages/frida/__init__.py", line 7, in <module>
    import _frida
ImportError: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /home/ubuntu/.envs/data/lib/python3.8/site-packages/_frida.cpython-38-aarch64-linux-gnu.so)

$ python -V
Python 3.8.10

$ python -V
Python 3.8.10

$ ldd /home/ubuntu/.envs/data/lib/python3.8/site-packages/_frida.cpython-38-aarch64-linux-gnu.so
/home/ubuntu/.envs/data/lib/python3.8/site-packages/_frida.cpython-38-aarch64-linux-gnu.so: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /home/ubuntu/.envs/data/lib/python3.8/site-packages/_frida.cpython-38-aarch64-linux-gnu.so)
        linux-vdso.so.1 (0x0000ffff97982000)
        libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffff95ece000)
        libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffff95ea2000)
        libresolv.so.2 => /lib/aarch64-linux-gnu/libresolv.so.2 (0x0000ffff95e7d000)
        libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffff95dc4000)
        libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff95c6b000)
        /lib/ld-linux-aarch64.so.1 (0x0000ffff97956000)

not sure where we built the pip packages for this. It seems the pip package for this problematic one was built on ubuntu20.
We should consider build from an older system in order to have better binary compatibility.

Yes totally agree. At the moment (out of laziness) we're building on Ubuntu 18.04 and using their cross-toolchain. But by building a toolchain+sysroot with as old glibc as possible it would be possible to improve this. Assistance there would be most appreciated!

Thanks @oleavr for pointing on the build file. It's interesting to see it's actually built on Ubuntu18.04 because I failed on the same system. I will look into what might break this when I get the next chance, since when I upgraded the os to Ubuntu20.04 this issue was gone.