XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.51k stars 1.46k forks source link

p2p fail with "bad message" #4175

Open halberdholder opened 2 years ago

halberdholder commented 2 years ago

When read a p2p stream and committed message to the read buffer, if the message flow includes two protocol packages, which will lead to a bad message error and p2p fail by it. Case compression closed, the following code ParseFromZeroCopyStream won't be succeed.

https://github.com/ripple/rippled/blob/34786abd4ff06f80022024d177e0d7dbf97abda9/src/ripple/overlay/impl/ProtocolMessage.h#L295

nbougalis commented 2 years ago

Interesting issue. Thank you for contributing a proposed fix; the change will be reviewed for inclusion in the next release.

intelliot commented 1 year ago

@nbougalis what are your latest thoughts on this issue?

(Given we don't know how to reproduce it, we are inclined to close the issue until we get more information.)