🇰🇷 한글 설명
Linux 커널의 ALSA sequencer 구성 요소에서 발생하는 취약점으로, 권한이 없는 사용자가 특정 IOCTL을 통해 타이머 해상도 값을 조작하여 0으로 나누기 오류를 유발할 수 있습니다. 이 오류는 인터럽트가 비활성화된 상태에서 발생하여 CPU를 중단시키고 시스템을 멈추게 만듭니다.
💡 쉬운 설명
사용자가 특수한 값을 입력하여 컴퓨터의 계산 과정을 방해함으로써 시스템을 멈추게 만들 수 있는 결함입니다. 이로 인해 컴퓨터가 응답하지 않는 상태(프리징)가 될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: seq: Fix division by zero in initialize_timer()
A userspace-driven ALSA timer (SND_UTIMER) lets an unprivileged user set
the backing snd_timer's hardware resolution to an arbitrary 64-bit value
via SNDRV_TIMER_IOCTL_CREATE. snd_utimer_create() only rejects zero.
When such a timer is bound to a sequencer queue, initialize_timer()
computes the tick period as
tmr->ticks = 1000000000 / (r * freq);
where r is that user-controlled resolution and freq is the sequencer
update rate in Hz, clamped to MIN_FREQUENCY..MAX_FREQUENCY (10..6250).
A resolution of 2^63 makes the 64-bit product r * freq wrap to zero for
any even freq, including DEFAULT_FREQUENCY (1000), so the division faults
with a divide-by-zero.
The division runs under tmr->lock with interrupts disabled, so the oops
leaves the spinlock held and hangs the CPU. It is reachable by an
unprivileged user with access to /dev/snd/timer and /dev/snd/seq.
Oops: divide error: 0000 [#1] SMP KASAN PTI
CPU: 7 UID: 1000 PID: 456 Comm: alsa_seq_utimer Not tainted 7.2.0-rc4+
RIP: 0010:initialize_timer.constprop.0+0x20a/0x2d0
snd_seq_timer_start+0x15e/0x2b0
snd_seq_control_queue+0x56f/0xba0
snd_seq_write+0x3e0/0x730
Reject an overflowing product with check_mul_overflow() and fall back to
a single tick, which also avoids feeding a wrapped-but-nonzero divisor
(e.g. 2^63 * 1000 mod 2^64 == 0, or other resolutions wrapping to a small
value) into the period computation.
📍 영향받는 시스템
Linux kernel (ALSA sequencer module 사용 환경)
⚔️ 공격 벡터
권한이 없는 사용자가 /dev/snd/timer 및 /dev/snd/seq 장치에 접근하여 SNDRV_TIMER_IOCTL_CREATE IOCTL 호출을 통해 조작된 해상도 값을 전달
🛡️ 대응 방법
check_mul_overflow()를 사용하여 곱셈 오버플로우를 방지하도록 커널 패치를 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전인지 확인합니다.
💻 영향받는 소프트웨어
NVIDIA Cloud Gaming Guest Driver for Linux