🔍 CVE-2026-31742

7.8
CVSS Score
HIGH
2026-05-01
2026-10-19 20:17
✅ 완료

🇰🇷 한글 설명

리눅스 커널의 vt 서브시스템에서 alt screen 종료 시 오래된 유니코드 버퍼를 적절히 처리하지 못해 발생하는 취약점입니다. 콘솔 크기가 변경된 상태에서 alt screen을 종료하면, 이전 크기에 맞춰 할당된 버퍼를 현재 크기로 접근하려 시도하면서 메모리 경계 외 참조(Out-of-bounds)가 발생하여 커널 패닉(Kernel Oops)을 유발할 수 있습니다.

💡 쉬운 설명

터미널 화면 크기를 조절한 뒤 특수한 화면 모드를 종료할 때, 컴퓨터가 잘못된 메모리 영역을 읽으려고 시도하여 시스템이 멈추거나 오류가 발생하는 문제입니다. 이는 잘못된 메모리 주소 접근으로 인해 시스템 전체의 안정성을 해칠 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: vt: discard stale unicode buffer on alt screen exit after resize When enter_alt_screen() saves vc_uni_lines into vc_saved_uni_lines and sets vc_uni_lines to NULL, a subsequent console resize via vc_do_resize() skips reallocating the unicode buffer because vc_uni_lines is NULL. However, vc_saved_uni_lines still points to the old buffer allocated for the original dimensions. When leave_alt_screen() later restores vc_saved_uni_lines, the buffer dimensions no longer match vc_rows/vc_cols. Any operation that iterates over the unicode buffer using the current dimensions (e.g. csi_J clearing the screen) will access memory out of bounds, causing a kernel oops: BUG: unable to handle page fault for address: 0x0000002000000020 RIP: 0010:csi_J+0x133/0x2d0 The faulting address 0x0000002000000020 is two adjacent u32 space characters (0x20) interpreted as a pointer, read from the row data area past the end of the 25-entry pointer array in a buffer allocated for 80x25 but accessed with 240x67 dimensions. Fix this by checking whether the console dimensions changed while in the alternate screen. If they did, free the stale saved buffer instead of restoring it. The unicode screen will be lazily rebuilt via vc_uniscr_check() when next needed.

📍 영향받는 시스템

Linux Kernel (vt subsystem 관련 버전)

⚔️ 공격 벡터

로컬 사용자가 콘솔 크기를 조절한 후 특정 시퀀스(csi_J 등)를 통해 alt screen을 조작하여 메모리 오류 유발

🛡️ 대응 방법

리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 vt 서브시스템의 버퍼 관리 로직을 수정해야 함

🔧 검증 코드

출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 배포판 보안 공지를 통해 대조함

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel