🇰🇷 한글 설명
Linux 커널의 evdev 드라이버에서 EVIOCSABS ioctl 핸들러가 사용자로부터 전달받은 크기만큼만 구조체를 복사할 때, 초기화되지 않은 스택 메모리가 남을 수 있는 취약점입니다. 이로 인해 EVIOCGABS를 통해 커널 스택에 남아있던 민감한 데이터가 사용자 공간으로 유출될 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제(커널)가 데이터를 저장할 때, 깨끗하게 비우지 않은 메모리 공간을 그대로 내보내어 중요한 정보가 유출될 수 있는 문제입니다. 공격자는 이 틈을 타서 시스템 내부의 비밀 정보를 훔쳐볼 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Input: evdev - zero absinfo before partial copy in EVIOCSABS
The EVIOCSABS handler copies at most the user supplied ioctl size into
an uninitialized on-stack struct input_absinfo:
if (copy_from_user(&abs, p, min_t(size_t,
size, sizeof(struct input_absinfo))))
The size comes from _IOC_SIZE() of the ioctl command and is therefore
fully controlled by userspace. A short size leaves the trailing part of
the structure holding whatever was on the kernel stack, and the whole
structure is then stored into the device:
dev->absinfo[t] = abs;
EVIOCGABS hands that back to userspace, disclosing the stale stack
bytes. Only the resolution field is currently cleared, which covers the
legacy struct layout but not an arbitrarily short size.
Zero the structure before the copy so any part not supplied by the
caller reads back as zero. The existing resolution fixup is kept, since
it also handles a size that partially overlaps that field.
📍 영향받는 시스템
Linux kernel (evdev driver 사용 시스템)
⚔️ 공격 벡터
사용자 공간에서 조작된 크기의 EVIOCSABS ioctl 명령을 호출하여 커널 스택의 잔여 데이터를 유출
🛡️ 대응 방법
커널 패치를 적용하여 구조체 복사 전 메모리를 0으로 초기화(Zeroing)해야 함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 보안 패치 버전인지 확인합니다.