Lack of signedPeerRecord Validation in C++ IdentifyMessageProcessor Leads to Address Injection
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- cpp
- 領域
- networking, security
調査の方向性
src/protocol/identify/identify_msg_processor.cpp から始め、特に IdentifyMessageProcessor::identifyReceived を確認し、検証動作について参照されている Go libp2p の修正と比較してください。signedPeerRecord のエンベロープが検証され、両方の PeerId の関係が接続およびレコードに対して確認され、すべてのチェックが成功した場合にのみ認証済みアドレスが受け入れられれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
The C++ implementation of libp2p’s Identify protocol (IdentifyMessageProcessor) does not validate or process the signedPeerRecord field in Identify messages.
This allows malicious peers to inject or forward third-party signed peer records, leading to address poisoning and potential identity spoofing, similar to previously fixed vulnerabilities in Go and JS libp2p implementations.
Expected behavior
When an Identify message includes a signedPeerRecord:
The envelope signature must be verified.
The public key inside the envelope must derive a PeerId equal to the connection’s remotePeerId.
The PeerRecord.peerId must also match this derived PeerId.
Only if all checks succeed should the certified addresses be accepted and stored.
Actual behavior
The current C++ code (IdentifyMessageProcessor::identifyReceived) only verifies the publicKey field.
It does not parse or validate signedPeerRecord.
A malicious peer can forward another peer’s valid signed record, causing addresses of an unrelated peer to be stored.
Relevant log output
Possible Solution
Go libp2p issue: Identity protocol accepts signed peer records without validation
Go libp2p fix: x
The revelent_file
Version
No response
Would you like to work on fixing this bug ?
Yes
- 主要言語
- C++
- スター
- 493
- フォーク
- 131
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
libp2p/cpp-libp2p のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
libp2p/cpp-libp2p#351 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
libp2p/cpp-libp2p#347 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
libp2p/cpp-libp2p#341 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
libp2p/cpp-libp2p#324 · コメント 1 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
libp2p/cpp-libp2p#313 · コメント 1 件 ·
libp2p/cpp-libp2p の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mesonbuild/wrapdb#2961 ·
メンテナーはふだん 1 日以内に返信
-
80 Instance - Raid - Northrend
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
azerothcore/azerothcore-wotlk#28075 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
objectionary/eo-graphs#80 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
scanaislop/aislop#476 ·
メンテナーはふだん 1 日以内に返信