Lack of signedPeerRecord Validation in C++ IdentifyMessageProcessor Leads to Address Injection
Đá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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của libp2p/cpp-libp2p
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
libp2p/cpp-libp2p#351 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
libp2p/cpp-libp2p#347 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
libp2p/cpp-libp2p#341 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
libp2p/cpp-libp2p#324 · 1 bình luận · 1 reaction ·
-
Build is failing all the timeĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
libp2p/cpp-libp2p#313 · 1 bình luận ·
Tất cả issue của libp2p/cpp-libp2p
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
AcademySoftwareFoundation/Imath#611 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The Outdated Version prompt shows the release tag as unescaped HTMLCó thể đã có người làm @on8st đã nhận hôm nay. Đang mởbug good first issue GUI maintainer-review priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aethersdr/AetherSDR#6405 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
bitcoin-core/gui-qml#1003 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
fails to compile with Qt6Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
[Bug]:设置的关于页面,“系统信息”部分排版异常Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
metasequoiaime/msime#7328 ·
Maintainer thường phản hồi trong vòng 1 ngày