🇰🇷 한글 설명
py-libp2p 0.7.0 및 이전 버전의 yamux 구현체에서 데이터 프레임 길이를 검증하기 전에 읽어들이는 취약점이 존재합니다. 공격자가 매우 큰 데이터 길이를 가진 프레임을 전송한 후 본문을 보내지 않으면, 시스템의 읽기 루프가 차단되어 해당 연결의 모든 스트림이 중단됩니다.
💡 쉬운 설명
해커가 아주 큰 데이터가 올 것이라고 거짓말을 한 뒤 데이터를 보내지 않으면, 프로그램이 그 데이터를 기다리느라 멈춰버리는 현상입니다. 이로 인해 해당 연결을 사용하는 모든 통신이 마비될 수 있습니다.
🇺🇸 원문 (English)
py-libp2p is the Python implementation of the libp2p networking stack. In 0.7.0 and earlier, the yamux handle_incoming() method in libp2p/stream_muxer/yamux/yamux.py reads an attacker-controlled 32-bit DATA frame length with read_exactly() before validating it against MAX_WINDOW_SIZE or checking whether stream_id exists. A peer that completes the standard Noise handshake can send a 12-byte frame declaring a 0xFFFFFFFF body and then withhold the body, causing the sequential yamux read loop used by the default new_host() configuration to block and preventing every stream on that connection from making progress. No fixed version is available as of this review.
📍 영향받는 시스템
py-libp2p 0.7.0 및 그 이전 버전
⚔️ 공격 벡터
Noise 핸드셰이크를 완료한 피어가 조작된 32비트 데이터 프레임 길이를 전송하여 읽기 루프를 차단함
🛡️ 대응 방법
현재 수정 버전이 없으므로 라이브러리 업데이트를 모니터링하거나, 신뢰할 수 없는 피어의 연결을 제한하는 보안 설정을 적용해야 함
🔧 검증 코드
출력된 버전이 0.7.0 이하인지 확인하여 취약 여부를 판단합니다.
pip show py-libp2p 2>/dev/null | grep Version