🇰🇷 한글 설명
오픈 소스 OCR 엔진인 Tesseract 5.5.3 및 이전 버전에서 LSTM 레이어 처리 중 힙 기반 경계 외 쓰기(Out-of-bounds write) 취약점이 발견되었습니다. 조작된 NT_LSTM 레이어를 통해 데이터 크기 불일치를 유발하면 힙 손상, 크래시 또는 임의 코드 실행이 가능할 수 있습니다.
💡 쉬운 설명
Tesseract라는 글자 인식 프로그램에서 특수하게 제작된 파일을 읽을 때 메모리 오류가 발생하는 문제입니다. 이 오류를 이용해 해커가 프로그램을 강제로 종료시키거나 컴퓨터를 제어하려 시도할 수 있습니다.
🇺🇸 원문 (English)
Tesseract is an open source OCR engine. In version 5.5.3 and earlier, prior .traineddata hardening added bounds checks to NetworkIO::CopyTimeStepGeneral and NetworkIO::Randomize in src/lstm/networkio.cpp but left NetworkIO::WriteTimeStepPart and NetworkIO::AddTimeStepPart unchecked. In LSTM::Forward in src/lstm/lstm.cpp, source_ is sized from the independently deserialized na_ field while the WriteTimeStepPart count is ns_, which comes from the CI gate WeightMatrix dim1() value. A crafted NT_LSTM layer can make ns_ much larger than na_, causing a heap out-of-bounds write during the first recognition step on the default LSTM engine and resulting in heap corruption, a crash, or potentially controlled corruption. No fixed release is available as of this review.
📍 영향받는 시스템
Tesseract OCR version 5.5.3 and earlier
⚔️ 공격 벡터
조작된 NT_LSTM 레이어가 포함된 데이터 파일을 Tesseract 엔진으로 처리할 때 발생
🛡️ 대응 방법
현재 수정 버전이 없으므로 신뢰할 수 없는 소스의 파일을 처리하지 않거나 보안 패치 출시를 기다려야 함
🔧 검증 코드
출력된 버전 번호가 5.5.3 이하인지 확인하여 취약 여부를 판단합니다.
tesseract --version 2>/dev/null | grep -E '5\[\.\d+\]'