🇰🇷 한글 설명
Perl용 Starman 0.4019 이전 버전에서는 요청 본문 읽기에 타임아웃이 없어, 헤더만 보낸 뒤 본문을 천천히 보내거나 멈춘 연결이 워커를 무기한 점유할 수 있습니다. 원격 공격자가 소수의 연결만으로 모든 워커를 막아 서버가 응답하지 못하게 할 수 있습니다. 0.4019에서는 본문 데이터 대기마다 read_timeout을 적용하고 전체 본문 읽기 시간을 제한하는 body_timeout(기본 300초)이 추가되었습니다.
💡 쉬운 설명
Starman 웹 서버가 요청 내용을 받다가 멈춰 있는 연결을 끊지 않아 서버 일꾼이 모두 묶일 수 있습니다. 공격자가 몇 개의 연결만으로 서버를 마비시켜 정상 사용자가 접속하지 못하게 할 수 있습니다.
🇺🇸 원문 (English)
Starman versions before 0.4019 for Perl allow a stalled request body to hold a worker indefinitely, as read_timeout covers only the headers.
Content-Length and chunked request bodies are read with blocking reads and no deadline. A client that sends complete headers and then stalls or trickles the body keeps the worker waiting until it disconnects.
A remote attacker can take every worker with a few such connections, five with the default worker count, so the server stops answering requests.
Version 0.4019 applies read_timeout to each wait for body data and adds a body_timeout limit, 300 seconds by default, on the total time to read a body.
📍 영향받는 시스템
Perl Starman 0.4019 미만 버전 사용 시스템
⚔️ 공격 벡터
원격 공격자가 헤더를 정상 전송한 뒤 요청 본문을 느리게 보내거나 중단한 연결을 여러 개 유지하여 워커를 고갈시키는 Slowloris 유형 서비스 거부 공격
🛡️ 대응 방법
Starman을 0.4019 이상으로 업그레이드하고, 업그레이드가 어려우면 리버스 프록시에서 요청 본문 타임아웃을 설정합니다.
🔧 검증 코드
출력된 버전이 0.4019 미만이면 취약하므로 업그레이드가 필요하고, 0.4019 이상이면 패치가 적용된 상태입니다.
perl -MStarman -e 'print "$Starman::VERSION\n"' 2>/dev/null || cpanm --info Starman 2>/dev/null | head -1