🔍 CVE-2026-98840

0.0
CVSS Score
UNKNOWN
2026-10-18
2026-10-21 13:21
✅ 완료

🇰🇷 한글 설명

Linux 커널의 vcs_write() 함수에서 vc 포인터를 적절한 시점에 갱신하지 않아 발생하는 Use-After-Free(UAF) 취약점입니다. 데이터 복사 실패 시 루프를 탈출하면서 이미 해제된 메모리 주소를 가진 stale 포인터를 참조하게 되어 시스템 오류를 유발할 수 있습니다.

💡 쉬운 설명

컴퓨터가 이미 사용이 끝나서 버려진 메모리 주소를 여전히 유효한 것으로 착각하고 접근하려 할 때 발생하는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 예상치 못한 동작을 할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: vc_screen: reload vc pointer before if (ret) in vcs_write() to avoid UAF The reload of 'vc' added by commit 8fb9ea65c9d1 ("vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF") sits after the 'if (ret)' block, so the copy-failure break path exits the loop without reloading vc. If the vc was kfree()'d via vc_port_destruct during the unlocked copy_from_user() window, the post-loop 'if (written && vc) vcs_scr_updated(vc)' is reached with a stale non-NULL vc. The '&& vc' guard from commit a287620312dc ("vc_screen: fix null-ptr-deref in vcs_notifier() during concurrent vcs_write") only handles the NULL case, not this stale-non-NULL case; vcs_notifier() then reads param->vc->vc_num from freed memory: BUG: KASAN: slab-use-after-free in vcs_notifier+0x7c/0xd0 Read of size 2 at addr ffff888007149190 Call Trace: vcs_notifier+0x7c/0xd0 atomic_notifier_call_chain+0x70/0xa0 vcs_scr_updated+0x77/0xa0 vcs_write+0x71b/0x7e0 Allocated by task: vc_allocate -> con_install -> tty_open Freed by task: kfree <- vt_ioctl (VT_DISALLOCATE -> vc_port_destruct) Move the reload to immediately after console_lock(), before 'if (ret)', so every break path below passes a fresh vc to the post-loop vcs_scr_updated().

📍 영향받는 시스템

Linux Kernel (vcs_write 관련 모듈 사용 버전)

⚔️ 공격 벡터

vcs_write() 호출 중 race condition을 유도하여 메모리 해제 후 잘못된 포인터 참조 유도

🛡️ 대응 방법

커널 패치를 적용하여 vcs_write() 내에서 vc 포인터를 console_lock() 직후에 즉시 갱신하도록 업데이트

🔧 검증 코드

커널 버전과 관련 심볼 존재 여부를 확인하여 패치 적용 여부를 검토합니다.

Shell / Script
uname -a && grep -E 'vc_screen|vcs_write' /proc/kallsyms

💻 영향받는 소프트웨어

Linux Kernel