🇰🇷 한글 설명
Linux 커널의 ASoC(SoC 오디오) 사운드 카드 등록 과정에서, card->dai_link의 num_codecs가 0인 경우 codec_dai가 NULL 포인터가 될 수 있는 문제가 확인되었습니다. 이 상태에서 snd_soc_new_compress()가 codec_dai를 참조하면 잘못된 메모리 접근이 발생할 수 있어, 수정에서 NULL 체크를 추가했습니다.
💡 쉬운 설명
오디오 장치를 등록하는 과정에서 필요한 값이 비어 있으면 프로그램이 존재하지 않는 곳을 참조할 수 있습니다. 이번 수정은 이런 잘못된 참조를 미리 막아 시스템이 비정상 종료되는 것을 방지합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ASoC: soc-compress: prevent the potentially use of null pointer
There is one call trace that snd_soc_register_card()
->snd_soc_bind_card()->soc_init_pcm_runtime()
->snd_soc_dai_compress_new()->snd_soc_new_compress().
In the trace the 'codec_dai' transfers from card->dai_link,
and we can see from the snd_soc_add_pcm_runtime() in
snd_soc_bind_card() that, if value of card->dai_link->num_codecs
is 0, then 'codec_dai' could be null pointer caused
by index out of bound in 'asoc_rtd_to_codec(rtd, 0)'.
And snd_soc_register_card() is called by various platforms.
Therefore, it is better to add the check in the case of misusing.
And because 'cpu_dai' has already checked in soc_init_pcm_runtime(),
there is no need to check again.
Adding the check as follow, then if 'codec_dai' is null,
snd_soc_new_compress() will not pass through the check
'if (playback + capture != 1)', avoiding the leftover use of
'codec_dai'.
📍 영향받는 시스템
수정 이전 Linux 커널 버전을 사용하는 ASoC 기반 오디오 하드웨어 플랫폼 (정확한 영향 범위는 배포판 커널 버전 확인 필요)
⚔️ 공격 벡터
일반적으로 로컬 권한이나 잘못된 드라이버 설정이 필요하며, 원격에서 직접 악용되기 어렵고 주로 커널 안정성(NULL 포인터 참조로 인한 크래시) 문제로 봅니다.
🛡️ 대응 방법
배포판에서 제공하는 최신 커널 보안 업데이트를 설치하고 재부팅하세요.
🔧 검증 코드
출력된 커널 버전이 해당 CVE 수정이 포함된 배포판 패키지 버전 이상인지 배포판 보안 공지와 비교해 판단합니다. 수정 이전 버전이면 업데이트가 필요합니다.
uname -r && (dpkg -l 'linux-image*' 2>/dev/null | grep '^ii' || rpm -qa 'kernel*' 2>/dev/null)