🇰🇷 한글 설명
libde265은 H.265 비디오 코덱의 오픈소스 구현체이다. 1.0.19 이전 버전의 decoder_context::decode_slice_unit_tiles 함수(decctx.cc:920)는 PPS에서 제공된 colBd/rowBd 배열로 계산한 ctbAddrRS 값을 SPS의 PicSizeInCtbsY와 검증하지 않고 CtbAddrRStoTS 배열을 읽어, 조작된 PPS를 통해 힙 버퍼 외부를 4바이트 읽는 힙 버퍼 오버플로우가 발생한다. 1.0.19 버전에서 수정되었다.
💡 쉬운 설명
악성으로 조작된 비디오 파일이 libde265 디코더에서 처리될 때 메모리 경계를 벗어난 읽기가 발생할 수 있습니다. 이 취약점은 프로그램 비정상 종료나 메모리 내용 노출로 이어질 수 있습니다.
🇺🇸 원문 (English)
libde265 is an open source implementation of the h.265 video codec. Prior to version 1.0.19, `decoder_context::decode_slice_unit_tiles` (libde265/decctx.cc:920) reads `pps.CtbAddrRStoTS[ctbAddrRS]` at line 966 where `ctbAddrRS = ctbY * ctbsWidth + ctbX` is computed from PPS-supplied `colBd[]`/`rowBd[]` arrays without validating the result against `CtbAddrRStoTS.size() == sps->PicSizeInCtbsY`. A malformed PPS that passes `set_derived_values` but encodes geometry inconsistent with the SPS produces a `ctbAddrRS` past the allocation, causing a 4-byte heap-buffer-overflow READ. Version 1.0.19 fixes the issue.
📍 영향받는 시스템
libde265 1.0.19 미만 버전을 사용하는 H.265/HEVC 디코딩 애플리케이션 및 시스템
⚔️ 공격 벡터
조작된 PPS 정보를 포함한 악성 H.265 비디오 스트림/파일을 피해자가 재생 또는 디코딩하도록 유도
🛡️ 대응 방법
libde265를 1.0.19 이상 버전으로 업데이트하고, 배포판 패키지 관리자 또는 소스에서 최신 버전을 설치
🔧 검증 코드
출력된 버전이 1.0.19 미만이면 취약하며, 1.0.19 이상이면 패치가 적용된 것입니다.
libde265-dec -v 2>&1 | head -n 1 || dpkg -l libde265-0 2>/dev/null | grep libde265