Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Lack of signedPeerRecord Validation in C++ IdentifyMessageProcessor Leads to Address Injection

オープン
#332 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@alienx5499 がすでに取り組んでいます。

2025年11月28日 から。

  • #338 @alienx5499 による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
cpp

調査の方向性

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 ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

libp2p/cpp-libp2p のほかの issue

libp2p/cpp-libp2p の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。