🇰🇷 한글 설명
Linux 커널의 ASoC SOF ipc3-control 구성 요소에서 TOCTOU(Time-of-Check to Time-of-Use) 취약점이 발견되었습니다. 데이터 크기를 검증하는 과정에서 실제 데이터 크기와 버퍼 크기 사이의 불일치가 발생하여 데이터가 잘리거나 잘못된 바이트가 복사될 수 있습니다.
💡 쉬운 설명
데이터를 주고받을 때 크기를 확인하는 과정에서 실수가 있어, 시스템이 잘못된 양의 데이터를 읽거나 쓸 수 있는 문제입니다. 이로 인해 데이터가 깨지거나 보안상 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ASoC: SOF: ipc3-control: Fix TOCTOU in bytes_put and bytes_get
In sof_ipc3_bytes_put(), the size used for the memcpy is derived from
the old data->size already in the buffer, not the incoming new data's
size field. If the new data has a different size, the copy length is
wrong: it may truncate valid data or copy stale bytes.
Similarly, sof_ipc3_bytes_get() checks data->size against max_size
without accounting for the sizeof(struct sof_ipc_ctrl_data) offset
of the flex array within the allocation.
Fix bytes_put to validate and use the incoming data's sof_abi_hdr.size
from ucontrol before copying. Fix bytes_get to subtract sizeof(*cdata)
from the bounds check to match the actual available space.
📍 영향받는 시스템
Linux kernel (ASoC SOF ipc3-control 관련 모듈 사용 시스템)
⚔️ 공격 벡터
조작된 크기 값을 가진 IPC3 제어 메시지를 전송하여 메모리 복사 오류 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인