🇰🇷 한글 설명
Linux 커널의 framebuffer 디바이스 드라이버에서 FBIOPUT_CON2FBMAP ioctl 호출 시 콘솔 크기 조정이 실패한 후에도 계속 진행되어, 잘못된 메모리 참조로 인한 out-of-bounds write가 발생합니다. 이는 fast_imageblit() 함수에서 유효하지 않은 구조체를 사용하여 메모리 손상을 초래합니다.
💡 쉬운 설명
Linux 그래픽 디스플레이 시스템에서 특정 명령을 보낼 때 메모리 경계를 벗어난 쓰기 작업이 발생합니다. 이를 통해 시스템이 충돌하거나 공격자가 권한을 상승시킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fbdev: Fix vmalloc out-of-bounds write in fast_imageblit
This issue triggers when a userspace program does an ioctl
FBIOPUT_CON2FBMAP by passing console number and frame buffer number.
Ideally this maps console to frame buffer and updates the screen if
console is visible.
As part of mapping it has to do resize of console according to frame
buffer info. if this resize fails and returns from vc_do_resize() and
continues further. At this point console and new frame buffer are mapped
and sets display vars. Despite failure still it continue to proceed
updating the screen at later stages where vc_data is related to previous
frame buffer and frame buffer info and display vars are mapped to new
frame buffer and eventully leading to out-of-bounds write in
fast_imageblit(). This bheviour is excepted only when fg_console is
equal to requested console which is a visible console and updates screen
with invalid struct references in fbcon_putcs().
📍 영향받는 시스템
Linux kernel 모든 버전에서 framebuffer console 기능이 활성화된 경우 (fb/console 드라이버 포함)
⚔️ 공격 벡터
로컬 사용자가 /dev/fb* 또는 /dev/console에 FBIOPUT_CON2FBMAP ioctl을 호출하여 트리거
🛡️ 대응 방법
Linux 커널을 패치된 버전으로 업데이트하거나 framebuffer console 기능 비활성화
🔧 검증 코드
첫 번째 줄은 현재 커널 버전, 두 번째 줄은 y/m이면 vulnerable, n이거나 not found면 안전
uname -r && grep -i 'CONFIG_FRAMEBUFFER_CONSOLE' /boot/config-$(uname -r) 2>/dev/null || echo 'config not found'