Skip to content

p2p: DecodeMessage should not always assume that data will be non-nil #817

@odeke-em

Description

@odeke-em

A followup of #816 found by fuzzing, but otherwise is obvious if we approach the functions from an outside attacker's perspective.

In PEXReactor.Receive, if a client passes in nil/no bytes, we deference the bytes in
https://github.com/tendermint/tendermint/blob/master/p2p/pex_reactor.go#L332

We should check that the bytes are not empty lest we get a crash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions