ziti-tunnel-sdk-c icon indicating copy to clipboard operation
ziti-tunnel-sdk-c copied to clipboard

ziti-edge-tunnel segfault when missing flags on certain subcommands

Open sabedevops opened this issue 2 years ago • 2 comments

Running ziti-edge-tunnel and any subcommand that leverages the unix domain socket to configure a running ziti-edge-tunnel causes the ziti-edge-tunnel program to segfault if that command is run without all the necessary flags.

Steps to reproduce:

  1. ziti-edge-tunnel run -I [/my/identities]
  2. ziti-edge-tunnel {enable,add,set_log_level,...}

Additionally, this can be replicated by directly writing to the unix socket, which implies the issue is somewhere downstream of argument parsing in the codebase (though certainly the argument parsing should enforce required flags):

printf '{"Command":"LoadIdentity","Data":{"ApiPageSize":0}}' | sudo nc --unixsock /tmp/ziti-edge-tunnel.sock

sabedevops avatar Jun 02 '22 01:06 sabedevops