🇰🇷 한글 설명
Linux 커널의 media: dvb-core 구성 요소에서 DVR 장치를 다시 열 때 링버퍼가 잘못 재초기화되는 취약점이 발견되었습니다. 이로 인해 공유 대기열(waitqueue)의 기존 항목들이 유실되거나 잘못된 포인터를 참조하게 되어 시스템 불안정성을 초래할 수 있습니다.
💡 쉬운 설명
TV 수신 장치를 다시 사용할 때 내부 데이터 저장 공간을 초기화하는 과정에서 오류가 발생합니다. 이 오류로 인해 기존에 연결되어 있던 프로그램들이 길을 잃고 시스템에 문제를 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: dvb-core: fix wrong reinitialization of ringbuffer on reopen
dvb_dvr_open() calls dvb_ringbuffer_init() when a new reader opens the
DVR device. dvb_ringbuffer_init() calls init_waitqueue_head(), which
reinitializes the waitqueue list head to empty.
Since dmxdev->dvr_buffer.queue is a shared waitqueue (all opens of the
same DVR device share it), this orphans any existing waitqueue entries
from io_uring poll or epoll, leaving them with stale prev/next pointers
while the list head is reset to {self, self}.
The waitqueue and spinlock in dvr_buffer are already properly
initialized once in dvb_dmxdev_init(). The open path only needs to
reset the buffer data pointer, size, and read/write positions.
Replace the dvb_ringbuffer_init() call in dvb_dvr_open() with direct
assignment of data/size and a call to dvb_ringbuffer_reset(), which
properly resets pread, pwrite, and error with correct memory ordering
without touching the waitqueue or spinlock.
📍 영향받는 시스템
Linux kernel (media: dvb-core 모듈 사용 시스템)
⚔️ 공격 벡터
로컬 사용자가 DVR 장치에 대한 open() 시스템 호출을 반복하여 대기열 상태를 조작함
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 dvb_ringbuffer_init() 대신 dvb_ringbuffer_reset()을 사용하도록 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.