Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#332 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@alienx5499 đang làm issue này rồi.

Từ ngày 28/11/2025.

  • #338 của @alienx5499 — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
networking, security

Hướng nghiên cứu

Bắt đầu với src/protocol/identify/identify_msg_processor.cpp, đặc biệt là IdentifyMessageProcessor::identifyReceived, và so sánh với bản sửa lỗi Go libp2p được tham chiếu về hành vi xác thực. Công việc được xem là hoàn tất khi các envelope signedPeerRecord được xác minh, cả hai quan hệ PeerId đều được kiểm tra đối chiếu với kết nối và record, và các địa chỉ được chứng nhận chỉ được chấp nhận khi tất cả các bước kiểm tra đều thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
C++
Star
493
Fork
131
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của libp2p/cpp-libp2p

Tất cả issue của libp2p/cpp-libp2p

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.