Files
tendermint/p2p
mergify[bot] 358b1f23c0 p2p/conn: check for channel id overflow before processing receive msg (backport #6522) (#6528)
* p2p/conn: check for channel id overflow before processing receive msg (#6522)

Per tendermint spec, each Channel has a globally unique byte id, which
is mapped to uint8 in Go. However, the proto PacketMsg.ChannelID field
is declared as int32, and when receive the packet, we cast it to a byte
without checking for possible overflow. That leads to a malform packet
with invalid channel id is sent successfully.

To fix it, we just add a check for possible overflow, and return invalid
channel id error.

Fixed #6521

(cherry picked from commit 1f46a4c90e)
2021-06-04 20:20:36 -04:00
..
2020-09-04 11:58:03 +00:00
2020-10-22 13:36:08 +02:00
2019-04-03 11:22:52 +02:00
2020-09-07 15:03:18 +00:00
2020-09-04 11:58:03 +00:00
2021-04-13 14:05:36 +02:00
2020-02-07 12:53:28 +01:00
2021-02-11 09:50:18 -05:00
2020-09-07 15:03:18 +00:00

p2p

The p2p package provides an abstraction around peer-to-peer communication.

Docs:

  • Connection for details on how connections and multiplexing work
  • Peer for details on peer ID, handshakes, and peer exchange
  • Node for details about different types of nodes and how they should work
  • Pex for details on peer discovery and exchange
  • Config for details on some config option