🇰🇷 한글 설명
Linux 커널의 remoteproc 구성 요소에서 signed int 타입 변환 오류로 인해 발생하는 OOB(Out-of-Bounds) 읽기 취약점입니다. 펌웨어에서 제공하는 오프셋 값이 음수로 해석될 경우, 경계 검사를 우회하여 테이블 버퍼 이전의 메모리 영역을 읽을 수 있습니다.
💡 쉬운 설명
컴퓨터가 숫자를 읽을 때 실수로 마이너스(-) 값으로 착각하여, 허용되지 않은 메모리 영역을 몰래 들여다볼 수 있는 문제입니다. 공격자가 조작된 데이터를 보내면 시스템의 중요한 정보가 유출될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
remoteproc: fix OOB read via signed offset in rsc_table_for_each_entry()
table->offset[i] is a u32 from firmware, but was stored into a signed
int. A crafted offset like 0xFFFFFFF0 becomes -16, placing hdr 16 bytes
before the table buffer. The subsequent avail check was bypassed
because the negative int was promoted to a large size_t in the
expression "table_sz - offset - sizeof(*hdr)", yielding a large positive
avail and letting the out-of-bounds hdr->type read proceed undetected.
Store the offset as u32 and validate it with unsigned comparisons before
any pointer arithmetic.
📍 영향받는 시스템
Linux kernel (remoteproc driver 사용 시스템)
⚔️ 공격 벡터
조작된 펌웨어 오프셋 값을 전달하여 메모리 경계 검사를 우회하는 방식
🛡️ 대응 방법
오프셋 값을 부호 없는 32비트 정수(u32)로 저장하고, 포인터 연산 전 부호 없는 비교를 통해 검증하도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 최신 보안 패치 버전인지 확인