🇰🇷 한글 설명
Linux 커널의 iwlwifi PCIe 드라이버에서 iwl_write_to_user_buf() 함수의 정수 오버플로우 취약점이 수정되었습니다. SIZE_MAX 값이 int 변수로 잘리면서 음수가 되어 copy_to_user 호출 시 힙 오버플로우가 발생할 수 있습니다. 다만 해당 함수는 0400 권한의 debugfs 작업이므로 보안 취약점으로 보기는 어렵습니다.
💡 쉬운 설명
무선 랜 드라이버의 디버그 기능에서 숫자 계산 실수가 있었고, 이로 인해 메모리 영역을 잘못 건드릴 수 있었습니다. 디버그 파일은 관리자만 읽을 수 있어 실제 위험은 낮습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
wifi: iwlwifi: pcie: Fix integer overflow in iwl_write_to_user_buf
An integer overflow occurs in the iwl_write_to_user_buf() function,
which is called by the iwl_dbgfs_monitor_data_read() function.
static bool iwl_write_to_user_buf(char __user *user_buf, ssize_t count,
void *buf, ssize_t *size,
ssize_t *bytes_copied)
{
int buf_size_left = count - *bytes_copied;
buf_size_left = buf_size_left - (buf_size_left % sizeof(u32));
if (*size > buf_size_left)
*size = buf_size_left;
If the user passes a SIZE_MAX value to the "ssize_t count" parameter,
the ssize_t count parameter is assigned to "int buf_size_left".
Then compare "*size" with "buf_size_left" . Here, "buf_size_left" is a
negative number, so "*size" is assigned "buf_size_left" and goes into
the third argument of the copy_to_user function, causing a heap overflow.
This is not a security vulnerability because iwl_dbgfs_monitor_data_read()
is a debugfs operation with 0400 privileges.
📍 영향받는 시스템
Intel 무선 랜 칩(iwlwifi)을 사용하는 수정 이전의 Linux 커널 버전
⚔️ 공격 벡터
권한이 있는 로컬 사용자가 debugfs의 monitor 데이터 파일을 매우 큰 크기로 읽도록 요청하는 방식
🛡️ 대응 방법
배포판에서 제공하는 최신 Linux 커널 보안 업데이트를 설치하고 재부팅하세요.
🔧 검증 코드
출력된 커널 버전을 배포판의 보안 권고에서 CVE-2023-53524 수정이 포함된 버전과 비교하고, 해당 버전 이상이면 패치된 것입니다.