You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling bofObjectRunAsyncThread() on a system with an older GLIBC versions (prior to 2.34) will cause a segmentation fault due to a NULL pointer dereference. This is because pthread functionality wasn't integrated into libc.so.6 in those GLIBC versions so the pthread_create and pthread_detach function pointers are NULL.
This should be reproducible by modifying the integration-with-c example to use bofObjectRunAsyncThread (demo.patch) and executing it on a system with an older GLIBC. I also have an example fix that patches bof_launcher.zig to load the functions from libpthread.so.0 (fix.patch).
test@test:~$ unzip demo.zipArchive: demo.zip inflating: demo.sh inflating: demo.patch inflating: fix.patch
# run an example that produces a crash test@test:~$ docker run --rm -it --entrypoint bash -v`pwd`:/data oraclelinux:8.9 /data/demo.sh
# run the example with the example fix appliedtest@test:~$ docker run --rm -it --entrypoint bash -v`pwd`:/data oraclelinux:8.9 /data/demo.sh 1
I have tested this patch on GLIBC 2.17, 2.28, 2.34, and 2.39 and the patch worked in all cases. However, I have only been able to test x86_64 and not architectures such as arm or aarch64.
I don't know if introducing a reliance on libpthread.so.0 (or the stub provided with modern GLIBC versions) is how you wanted to address this until issue #1 is solved so I didn't want to preemptively make a pull request. Let me know if you would like me to make one though.
Thanks for making and maintaining this project, I've found it to be quite interesting and useful!
The text was updated successfully, but these errors were encountered:
Calling
bofObjectRunAsyncThread()
on a system with an older GLIBC versions (prior to 2.34) will cause a segmentation fault due to a NULL pointer dereference. This is because pthread functionality wasn't integrated intolibc.so.6
in those GLIBC versions so thepthread_create
andpthread_detach
function pointers are NULL.This should be reproducible by modifying the
integration-with-c
example to usebofObjectRunAsyncThread
(demo.patch
) and executing it on a system with an older GLIBC. I also have an example fix that patchesbof_launcher.zig
to load the functions fromlibpthread.so.0
(fix.patch
).demo.zip
I have tested this patch on GLIBC 2.17, 2.28, 2.34, and 2.39 and the patch worked in all cases. However, I have only been able to test x86_64 and not architectures such as arm or aarch64.
I don't know if introducing a reliance on
libpthread.so.0
(or the stub provided with modern GLIBC versions) is how you wanted to address this until issue #1 is solved so I didn't want to preemptively make a pull request. Let me know if you would like me to make one though.Thanks for making and maintaining this project, I've found it to be quite interesting and useful!
The text was updated successfully, but these errors were encountered: