🇰🇷 한글 설명
Linux 커널의 ALSA OSS 레이어에서 PCM 버퍼 할당 시 정수 오버플로(INT_MAX)가 발생하는 취약점입니다. 데이터 변환을 위한 임시 버퍼 크기를 계산할 때 채널 수나 샘플링 레이트가 높으면 버퍼 크기가 비정상적으로 커져 시스템 경고(WARN_ON)를 유발할 수 있습니다.
💡 쉬운 설명
소리 데이터를 처리하는 과정에서 계산 오류로 인해 컴퓨터가 감당할 수 없는 너무 큰 메모리를 요청하게 되는 문제입니다. 이로 인해 시스템이 불안정해지거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ALSA: oss: Fix PCM OSS buffer allocation overflow
We've got syzbot reports hitting INT_MAX overflow at vmalloc()
allocation that is called from snd_pcm_plug_alloc(). Although we
apply the restrictions to input parameters, it's based only on the
hw_params of the underlying PCM device. Since the PCM OSS layer
allocates a temporary buffer for the data conversion, the size may
become unexpectedly large when more channels or higher rates is given;
in the reported case, it went over INT_MAX, hence it hits WARN_ON().
This patch is an attempt to avoid such an overflow and an allocation
for too large buffers. First off, it adds the limit of 1MB as the
upper bound for period bytes. This must be large enough for all use
cases, and we really don't want to handle a larger temporary buffer
than this size. The size check is performed at two places, where the
original period bytes is calculated and where the plugin buffer size
is calculated.
In addition, the driver uses array_size() and array3_size() for
multiplications to catch overflows for the converted period size and
buffer bytes.
📍 영향받는 시스템
ALSA OSS 레이어를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
조작된 하드웨어 파라미터(높은 채널 수 또는 샘플링 레이트)를 전달하여 버퍼 할당 오버플로 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인