🇰🇷 한글 설명
Linux 커널의 accel/qaic 드라이버 내 decode_message() 함수에서 경계 검사 미흡으로 인한 취약점이 발견되었습니다. 이 취약점은 헤더 크기 검증 누락 및 정수 오버플로우 가능성으로 인해 메모리 오염을 유발할 수 있습니다.
💡 쉬운 설명
데이터를 해석하는 과정에서 데이터의 크기를 제대로 확인하지 않아 발생하는 문제입니다. 공격자가 조작된 데이터를 보내면 컴퓨터의 메모리가 망가질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
accel/qaic: tighten bounds checking in decode_message()
Copy the bounds checking from encode_message() to decode_message().
This patch addresses the following concerns. Ensure that there is
enough space for at least one header so that we don't have a negative
size later.
if (msg_hdr_len < sizeof(*trans_hdr))
Ensure that we have enough space to read the next header from the
msg->data.
if (msg_len > msg_hdr_len - sizeof(*trans_hdr))
return -EINVAL;
Check that the trans_hdr->len is not below the minimum size:
if (hdr_len < sizeof(*trans_hdr))
This minimum check ensures that we don't corrupt memory in
decode_passthrough() when we do.
memcpy(out_trans->data, in_trans->data, len - sizeof(in_trans->hdr));
And finally, use size_add() to prevent an integer overflow:
if (size_add(msg_len, hdr_len) > msg_hdr_len)
📍 영향받는 시스템
Linux Kernel (accel/qaic 드라이버 포함 버전)
⚔️ 공격 벡터
조작된 메시지 헤더를 포함한 악성 데이터를 accel/qaic 드라이버로 전송
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인합니다.