yggdrasil-network / yggdrasil-go

An experiment in scalable routing as an encrypted IPv6 overlay network

Home Page:https://yggdrasil-network.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Panic if the key length in debug_ requests exceeds the maximum.

ufm opened this issue · comments

add two hex chars to key and do request:

sudo yggdrasilctl debug_remotegettree key=9292809285de5689968da3d64fa1edcec19ad5158cdec3c14a21a6a5d0b82320ff
2023/12/02 00:59:58 Configuration file doesn't contain appropriate AdminListen option
2023/12/02 00:59:58 Falling back to platform default unix:///var/run/yggdrasil/yggdrasil.sock
2023/12/02 00:59:58 Connecting to UNIX socket /var/run/yggdrasil/yggdrasil.sock
2023/12/02 00:59:58 Connected
2023/12/02 00:59:58 Sending request: debug_remotegettree
2023/12/02 00:59:58 Request sent
2023/12/02 00:59:58 Fatal error: EOF

and Node panic in syslog:

Dec 2 00:59:58 ufmpc yggdrasil[3213592]: panic: runtime error: invalid memory address or nil pointer dereference
Dec 2 00:59:58 ufmpc yggdrasil[3213592]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7f5ade]
Dec 2 00:59:58 ufmpc yggdrasil[3213592]: goroutine 11368 [running]:
Dec 2 00:59:58 ufmpc yggdrasil[3213592]: github.com/yggdrasil-network/yggdrasil-go/src/core.(*protoHandler).getTreeHandler(0xc0002c0018?, {0xc000
02e5a0, 0x4c, 0x50})
Dec 2 00:59:58 ufmpc yggdrasil[3213592]: #11/home/runner/work/yggdrasil-go/yggdrasil-go/src/core/proto.go:369 +0x67e
Dec 2 00:59:58 ufmpc yggdrasil[3213592]: github.com/yggdrasil-network/yggdrasil-go/src/admin.(*AdminSocket).handleRequest.func1(0xc000945ec0, 0x4
6b46e?, 0xc0008adab8, 0xc000532c60, 0xc000945f38, 0xc00011c050)
Dec 2 00:59:58 ufmpc yggdrasil[3213592]: #11/home/runner/work/yggdrasil-go/yggdrasil-go/src/admin/admin.go:351 +0x226
Dec 2 00:59:58 ufmpc yggdrasil[3213592]: github.com/yggdrasil-network/yggdrasil-go/src/admin.(*AdminSocket).handleRequest(0xc00011c050, {0x9bd108
?, 0xc0003d20e0})
Dec 2 00:59:58 ufmpc yggdrasil[3213592]: #11/home/runner/work/yggdrasil-go/yggdrasil-go/src/admin/admin.go:360 +0x23e
Dec 2 00:59:58 ufmpc yggdrasil[3213592]: created by github.com/yggdrasil-network/yggdrasil-go/src/admin.(*AdminSocket).listen
Dec 2 00:59:58 ufmpc yggdrasil[3213592]: #11/home/runner/work/yggdrasil-go/yggdrasil-go/src/admin/admin.go:289 +0x9b0
Dec 2 00:59:58 ufmpc systemd[1]: yggdrasil.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 2 00:59:58 ufmpc systemd[1]: yggdrasil.service: Failed with result 'exit-code'.