Velocidex/velociraptor

Accessing a non-existent artifact crashes velociraptor

Closed this issue · 1 comments

Backtrace:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x120 pc=0x10f3b49]

goroutine 1044 [running]:
www.velocidex.com/golang/velociraptor/api.(*ApiServer).GetArtifacts(0xc001f97e00, {0x28dfeb0, 0xc00170b020}, 0xc00350fe60)
	/home/runner/work/velociraptor/velociraptor/api/api.go:717 +0x489
www.velocidex.com/golang/velociraptor/api/proto._API_GetArtifacts_Handler({0x2495280, 0xc001f97e00}, {0x28dfeb0, 0xc00170b020}, 0xc000b3c1c0, 0x0)
	/home/runner/work/velociraptor/velociraptor/api/proto/api_grpc.pb.go:2087 +0x1a9
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003a9680, {0x28ed620, 0xc00028cd00}, 0xc0015398c0, 0xc001f97e90, 0x3a31c80, 0x0)
	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.58.3/server.go:1374 +0xd91
google.golang.org/grpc.(*Server).handleStream(0xc0003a9680, {0x28ed620, 0xc00028cd00}, 0xc0015398c0, 0x0)
	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.58.3/server.go:1751 +0x9da
google.golang.org/grpc.(*Server).serveStreams.func1.1()
	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.58.3/server.go:986 +0xaf
created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 420
	/home/runner/go/pkg/mod/google.golang.org/grpc@v1.58.3/server.go:997 +0x136

Steps to reproduce:

  1. Fire up velociraptor gui
  2. Navigate to https://127.0.0.1:8889/app/index.html#/artifacts/Anything.Really
  3. Refresh

Fixed in 0.73.2