🇰🇷 한글 설명
pageant 크레이트의 PageantStream 구현에서 피어가 제어하는 4바이트 길이 접두사를 검증 없이 신뢰하여, _AGENT_MAX_MSGLEN 한도를 확인하지 않고 len + 4 바이트까지 버퍼링합니다. 이로 인해 악의적인 서버가 대용량 메모리 할당을 유발하거나 불완전한 프레임을 유지시켜 클라이언트 메모리 고갈을 일으킬 수 있습니다. 0.2.5 버전에서 수정되었습니다.
💡 쉬운 설명
SSH 에이전트 통신에 쓰이는 라이브러리에서 상대방이 보낸 길이 값을 제대로 검사하지 않아 발생하는 문제입니다. 악의적인 서버가 이를 이용해 클라이언트의 메모리를 모두 소진시킬 수 있습니다.
🇺🇸 원문 (English)
pageant provides a PageantStream type that implements AsyncRead and AsyncWrite traits and can be used to communicate with a running Pageant instance. From 0.2.0 until 0.2.5, PageantStream::new in pageant/src/wmmessage.rs trusts a peer-controlled four-byte length prefix and buffers until len + 4 bytes are available without checking the fixed _AGENT_MAX_MSGLEN transport capacity. An application that bridges an SSH forwarded-agent channel to the raw stream can allow a malicious server to force large allocations or retain a partially filled frame, causing client memory exhaustion. This issue is fixed in version 0.2.5.
📍 영향받는 시스템
pageant 크레이트 0.2.0 이상 0.2.5 미만을 사용하는 Rust 애플리케이션 (SSH 포워딩 에이전트 브리지 구성)
⚔️ 공격 벡터
악의적인 SSH 서버가 포워딩된 에이전트 채널을 통해 과도하게 큰 길이 접두사를 전송하여 클라이언트의 메모리 할당 및 보유를 유발
🛡️ 대응 방법
pageant 크레이트를 0.2.5 이상으로 업그레이드 (cargo update -p pageant 실행 후 Cargo.lock 확인)
🔧 검증 코드
출력된 버전이 0.2.5 미만(0.2.0~0.2.4)이면 취약하며 업그레이드가 필요하고, 0.2.5 이상이면 수정된 버전입니다. 출력이 없으면 프로젝트가 해당 크레이트를 사용하지 않는 것입니다.
grep -A1 'name = "pageant"' Cargo.lock 2>/dev/null | grep version
💻 영향받는 소프트웨어
IBM WebSphere Application Server