Invalid memory address or nil pointer dereference
snemes opened this issue · 6 comments
snemes commented
Tested slrp_0.1.3_linux_amd64.tar.gz
on two different Linux machines (Ubuntu 20.04.5 LTS and Linux Mint 21), and after running for a few minutes it crashed with a NULL pointer reference issue:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x8b86e9]
goroutine 38597 [running]:
github.com/bdandy/go-socks4.socks4.Dial.func1()
/home/runner/work/slrp/slrp/vendor/github.com/bdandy/go-socks4/socks4.go:73 +0x29
github.com/bdandy/go-socks4.socks4.Dial({0xc0026ceab0?, {0xf1baa0?, 0x15359b0?}}, {0xc2a6d3?, 0x90?}, {0xc001de3350, 0x16})
/home/runner/work/slrp/slrp/vendor/github.com/bdandy/go-socks4/socks4.go:85 +0x114d
github.com/nfx/slrp/pmux.dialProxiedConnection({0xf1f8b0, 0xc0024c9560}, {0xc2a6d3, 0x3}, {0xc001de3350, 0x16})
/home/runner/work/slrp/slrp/pmux/proxy.go:175 +0x177
net/http.(*Transport).customDialTLS(0x0?, {0xf1f8b0?, 0xc0024c9560?}, {0xc2a6d3?, 0xf1f040?}, {0xc001de3350?, 0xc00271b358?})
/opt/hostedtoolcache/go/1.18.8/x64/src/net/http/transport.go:1317 +0x50
net/http.(*Transport).dialConn(0xc00032e8c0, {0xf1f8b0, 0xc0024c9560}, {{}, 0x0, {0xc3f9a5, 0x5}, {0xc001de3350, 0x16}, 0x0})
/opt/hostedtoolcache/go/1.18.8/x64/src/net/http/transport.go:1583 +0x3ff
net/http.(*Transport).dialConnFor(0xf19980?, 0xc002a10a50)
/opt/hostedtoolcache/go/1.18.8/x64/src/net/http/transport.go:1449 +0xb0
created by net/http.(*Transport).queueForDial
/opt/hostedtoolcache/go/1.18.8/x64/src/net/http/transport.go:1418 +0x3d2
nfx commented
@snemes thanks for reminder - upstream fix got merged in bdandy/go-socks4#2, need to cut a new release
doomedraven commented
updated lib here #40 but i need help with tests, not sure why they fails now
nfx commented
Released v0.1.4, please run slrp -update
to pick the latest version and see if it fixes the issue
doomedraven commented
or in case of error like this
./slrp -update
[================================================] 100%
panic: looking up path of "slrp": exec: "slrp": executable file not found in $PATH
goroutine 1 [running]:
github.com/nfx/slrp/internal/updater.AutoUpdate({0xf14490, 0x5})
/home/runner/work/slrp/slrp/internal/updater/auto.go:42 +0x207
main.main()
/home/runner/work/slrp/slrp/main.go:30 +0xa8
This fixes it
PATH=.:$PATH ./slrp -update
snemes commented
This fixed the issues. Thanks.
nfx commented
@doomedraven Please file a bug about -update flag 😂