Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect skydive from invalid TCPConn/TCPListen formats #5

Open
adrianlzt opened this issue Feb 22, 2021 · 1 comment
Open

Protect skydive from invalid TCPConn/TCPListen formats #5

adrianlzt opened this issue Feb 22, 2021 · 1 comment

Comments

@adrianlzt
Copy link

If we try to create a node with Metadata.TCPConn with an invalid value:

2021-02-22 17:46:58.457917 I | http: panic serving 127.0.0.1:45500: interface conversion: interface {} is string, not *proccon.NetworkInfo
goroutine 1349 [running]:
net/http.(*conn).serve.func1(0xc001c86aa0)
        /usr/lib/go/src/net/http/server.go:1801 +0x147
panic(0x4e3e760, 0xc000954f00)
        /usr/lib/go/src/runtime/panic.go:975 +0x47a
github.com/skydive-project/skydive/topology/probes/procpeering.listenEndpointHasher(0xc0010095f0, 0xc000954db0)
        /home/adrian/go/src/github.com/skydive-project/skydive/topology/probes/procpeering/procpeering.go:183 +0x387
github.com/skydive-project/skydive/graffiti/graph.(*Indexer).OnNodeAdded(0xc000292060, 0xc0010095f0)
        /home/adrian/go/src/github.com/skydive-project/skydive/graffiti/graph/indexer.go:133 +0x34
@adrianlzt
Copy link
Author

If I try to pass the correct value:

goroutine 230 [running]:
net/http.(*conn).serve.func1(0xc0003f2960)
        /usr/lib/go/src/net/http/server.go:1801 +0x147
panic(0x4e3e760, 0xc000cf29c0)
        /usr/lib/go/src/runtime/panic.go:975 +0x47a
github.com/skydive-project/skydive/topology/probes/procpeering.listenEndpointHasher(0xc0002d70e0, 0xc000cf2990)
        /home/adrian/go/src/github.com/skydive-project/skydive/topology/probes/procpeering/procpeering.go:183 +0x387

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant