semigodking / redsocks

transparent redirector of any TCP/UDP connection to proxy
Apache License 2.0
1.14k stars 246 forks source link

Segmentation fault #164

Closed mirfatif closed 5 months ago

mirfatif commented 2 years ago

Statically linked to musl libc, built on Void Linux aarch64. libevent built in the same environment , linked to Void's libressl.

~$ redsocks2 -v
redsocks.git/release-0.67-8-g8fcc880 OpenSSL-unclean
Features: 
Built with libevent-2.1.12-stable
Runs  with libevent-2.1.12-stable

~$ gdb --args ./redsocks2 -c redsocks2.conf
...
(gdb) run
...
Program received signal SIGSEGV, Segmentation fault.
0x0000000000400e4c in vp_in_addr ()

Problem started with https://github.com/semigodking/redsocks/commit/3f41aa2805f74aac8cbb7b9033eaf1a4302d9507. Please let me know if any further info is required.

semigodking commented 2 years ago

I have no time to investigate this. However, I have a statically compiled version running well on aarch64. Maybe you can use static compiled binary as a workaround.

Irfan Latif @.***> 于 2021年7月4日周日 20:36写道:

Statically linked to musl libc, built on Void Linux aarch64. libevent built in the same environment , linked to Void's libressl.

~$ redsocks2 -v redsocks.git/release-0.67-8-g8fcc880 OpenSSL-unclean Features: Built with libevent-2.1.12-stable Runs with libevent-2.1.12-stable

~$ gdb --args ./redsocks2 -c redsocks2.conf ... (gdb) run ... Program received signal SIGSEGV, Segmentation fault. 0x0000000000400e4c in vp_in_addr ()

Problem started with 3f41aa2 https://github.com/semigodking/redsocks/commit/3f41aa2805f74aac8cbb7b9033eaf1a4302d9507 . Please let me know if any further info is required.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/semigodking/redsocks/issues/164, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP2XD6UMXWZKZZT5WWYL2DTWBITLANCNFSM47ZE3SUA .

mirfatif commented 2 years ago

I have no time to investigate this. However, I have a statically compiled version running well on aarch64. Maybe you can use static compiled binary as a workaround.

Yes please share the aarch64 binary. And it would be better if you can please tell at which commit it's built, and which toolchain was used. Mine is also static compiled binary which started segfaulting with https://github.com/semigodking/redsocks/commit/3f41aa2805f74aac8cbb7b9033eaf1a4302d9507.

Please close this if you don't intend to work on it in future.

semigodking commented 2 years ago

redsocks2.zip The file is attached. Version info:

redsocks.git/release-0.67-35-g45c881e OpenSSL
Features: STATIC_COMPILE
Built with libevent-2.1.11-stable
Runs  with libevent-2.1.11-stable