🇰🇷 한글 설명
Linux 커널의 media: vidtv 구성 요소에서 NULL 포인터 역참조로 인한 시스템 충돌 취약점이 발견되었습니다. PMT 섹션 PID 생성 시 할당 실패를 확인하지 않아 발생하는 문제로, 잘못된 메모리 접근 시 일반 보호 오류(General Protection Fault)를 유발합니다.
💡 쉬운 설명
프로그램이 데이터가 들어있는 주소를 찾아가야 하는데, 주소가 비어있는(NULL) 상태에서 데이터를 읽으려다 시스템이 멈추는 문제입니다. 특정 조건에서 메모리 할당이 실패했을 때 이를 제대로 확인하지 않아 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: vidtv: fix NULL pointer dereference in vidtv_mux_push_si
syzbot reported a general protection fault in
vidtv_psi_ts_psi_write_into [1].
vidtv_mux_get_pid_ctx() can return NULL, but vidtv_mux_push_si() does
not check for this before dereferencing the returned pointer to access
the continuity counter. This leads to a general protection fault when
accessing a near-NULL address.
The root cause is that vidtv_mux_pid_ctx_init() does not check the
return value of vidtv_mux_create_pid_ctx_once() for PMT section PIDs.
If the allocation fails, the PID context is never created, but init
returns success. The subsequent vidtv_mux_push_si() call then gets
NULL from vidtv_mux_get_pid_ctx() and crashes.
Fix both the root cause (add error check in vidtv_mux_pid_ctx_init
for PMT PIDs) and add defensive NULL checks in vidtv_mux_push_si for
all vidtv_mux_get_pid_ctx() calls.
[1]
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
Workqueue: events vidtv_mux_tick
RIP: 0010:vidtv_psi_ts_psi_write_into+0x54a/0xbc0 drivers/media/test-drivers/vidtv/vidtv_psi.c:197
Call Trace:
<TASK>
vidtv_psi_table_header_write_into drivers/media/test-drivers/vidtv/vidtv_psi.c:799 [inline]
vidtv_psi_pmt_write_into+0x3b2/0xa70 drivers/media/test-drivers/vidtv/vidtv_psi.c:1231
vidtv_mux_push_si+0x932/0xe80 drivers/media/test-drivers/vidtv/vidtv_mux.c:196
vidtv_mux_tick+0xe9b/0x1480 drivers/media/test-drivers/vidtv/vidtv_mux.c:408
📍 영향받는 시스템
Linux kernel (media: vidtv driver 포함 버전)
⚔️ 공격 벡터
특정 조건에서 메모리 할당 실패를 유도하여 커널 패닉(Crash)을 일으키는 로컬/원격 공격 가능성
🛡️ 대응 방법
커널 패치를 적용하여 vidtv_mux_pid_ctx_init의 오류 검사 로직을 강화하고 vidtv_mux_push_si에 NULL 체크를 추가해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전인지 확인합니다.