🇰🇷 한글 설명
Linux 커널의 ibmasm 구성 요소에서 command_file_write 함수가 입력 크기를 적절히 검증하지 않아 발생하는 OOB(Out-of-Bounds) 읽기 취약점입니다. 공격자가 조작된 헤더 정보를 통해 할당된 버퍼 범위를 벗어난 메모리에 접근함으로써 커널 힙 메모리를 유출할 수 있습니다.
💡 쉬운 설명
컴퓨터의 메모리 공간을 계산할 때 검사 과정을 빠뜨려, 정해진 범위를 넘어서는 데이터를 읽어오는 문제입니다. 이를 통해 해커가 시스템의 중요한 비밀 정보를 몰래 훔쳐볼 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ibmasm: fix OOB reads in command_file_write due to missing size checks
The command_file_write() handler allocates a kernel buffer of exactly
count bytes and copies user data into it, but does not validate the
buffer against the dot command protocol before passing it to
get_dot_command_size() and get_dot_command_timeout().
Since both the allocation size (count) and the header fields (command_size,
data_size) are independently user-controlled, an attacker can cause
get_dot_command_size() to return a value exceeding the allocation,
triggering OOB reads in get_dot_command_timeout() and an out-of-bounds
memcpy_toio() that leaks kernel heap memory to the service processor.
Fix with two guards: reject writes smaller than sizeof(struct
dot_command_header) before allocation, then after copying user data
reject commands where the buffer is smaller than the total size declared
by the header (sizeof(header) + command_size + data_size). This ensures
all subsequent header and payload field accesses stay within the buffer.
📍 영향받는 시스템
Linux kernel (ibmasm module 포함 버전)
⚔️ 공격 벡터
사용자 제어 가능한 헤더 필드(command_size, data_size)를 조작하여 할당된 버퍼 크기보다 큰 값을 전달하는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 ibmasm의 크기 검증 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이상인지 확인합니다.