Skip to content

Protect skydive from invalid TCPConn/TCPListen formats #5

@adrianlzt

Description

@adrianlzt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions