🇰🇷 한글 설명
PJSIP 라이브러리의 pjsip_generic_array_hdr_print() 함수에서 버퍼 오버플로우 취약점이 발견되었습니다. 특정 출력 버퍼 경계 조건에서 함수가 버퍼 끝을 1바이트 초과하여 데이터를 작성할 수 있으며, 이는 SIP 요청을 재직렬화하는 프록시나 SBC 환경에서 발생할 수 있습니다.
💡 쉬운 설명
통신 라이브러리가 데이터를 정리하는 과정에서 정해진 공간보다 아주 조금 더 많은 데이터를 쓰려고 시도하는 오류입니다. 공격자가 특수하게 조작된 메시지를 보내면 프로그램의 메모리 일부를 건드릴 수 있습니다.
🇺🇸 원문 (English)
PJSIP is a free and open source multimedia communication library written in C. Prior to commit d6a0e7f, a buffer overflow can occur in pjsip_generic_array_hdr_print() in pjsip/src/pjsip/sip_msg.c, the function that serializes generic array headers (such as Allow, Require, Supported, and Unsupported). Under certain output-buffer boundary conditions the function can write one byte past the end of the buffer. This is reachable mainly in applications that parse and re-serialize incoming SIP requests — for example a proxy, SBC, or B2BUA — where a remote peer can influence the serialized message. The out-of-bounds write is a single fixed byte; code execution and information disclosure are not demonstrated, and in typical pool-based allocations the byte falls within allocation slack. This issue has been patched via commit d6a0e7f.
📍 영향받는 시스템
PJSIP 라이브러리 (commit d6a0e7f 적용 전 버전)
⚔️ 공격 벡터
원격의 공격자가 조작된 SIP 요청 메시지를 전송하여 서버가 이를 처리하고 재직렬화하도록 유도
🛡️ 대응 방법
PJSIP 라이브러리를 수정 사항이 반영된 최신 버전(commit d6a0e7f 포함 버전)으로 업데이트
🔧 검증 코드
명령어 결과에 d6a0e7f 커밋 해시가 포함되어 있으면 안전하며, 그렇지 않으면 취약할 수 있습니다.
git log -1 --format=%H | grep d6a0e7f || echo 'Vulnerable or Patch not applied'