🇰🇷 한글 설명
Linux 커널의 vc_screen 구성 요소에서 vcs_write() 함수 실행 중 경합 조건(Race Condition)으로 인해 발생하는 NULL 포인터 역참조 취약점입니다. 데이터 복사를 위해 잠시 락을 해제하는 사이 vc 객체가 해제될 경우, NULL 포인터를 참조하여 시스템 충돌이 발생할 수 있습니다.
💡 쉬운 설명
여러 작업이 동시에 일어날 때, 이미 사라진 데이터를 참조하려고 시도하여 컴퓨터 시스템이 멈추거나 오류가 발생하는 문제입니다. 데이터가 삭제되었는지 확인하는 절차가 누락되어 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
vc_screen: fix null-ptr-deref in vcs_notifier() during concurrent vcs_write
A KASAN null-ptr-deref was observed in vcs_notifier():
BUG: KASAN: null-ptr-deref in vcs_notifier+0x98/0x130
Read of size 2 at addr qmp_cmd_name: qmp_capabilities, arguments: {}
The issue is a race condition in vcs_write(). When the console_lock is
temporarily dropped (to copy data from userspace), the vc_data pointer
obtained from vcs_vc() may become stale. After re-acquiring the lock,
vcs_vc() is called again to re-validate the pointer. If the vc has been
deallocated in the meantime, vcs_vc() returns NULL, and the while loop
breaks (with written > 0). However, after the loop, vcs_scr_updated(vc)
is still called with the now-NULL vc pointer, leading to a null pointer
dereference in the notifier chain (vcs_notifier dereferences param->vc).
Fix this by adding a NULL check for vc before calling vcs_scr_updated().
📍 영향받는 시스템
Linux Kernel (vc_screen 관련 모듈 사용 시스템)
⚔️ 공격 벡터
동시성 제어를 이용한 경합 조건 유도 (Race Condition)
🛡️ 대응 방법
vcs_scr_updated() 호출 전 vc 포인터에 대한 NULL 체크 로직이 포함된 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.