🔍 CVE-2024-53192

7.8
CVSS Score
HIGH
2024-12-27
2026-08-04 11:22
✅ 완료

🇰🇷 한글 설명

Linux 커널의 clk-loongson2 드라이버에서 flexible-array 멤버인 hws에 대한 버퍼 오버플로 취약점이 발견되었습니다. 메모리 할당 시 요소의 개수를 나타내는 num 값이 실제 할당된 크기를 초과할 수 있어 런타임 시 메모리 오염을 유발할 수 있습니다.

💡 쉬운 설명

컴퓨터 메모리를 빌릴 때 실제 필요한 양보다 더 많은 양을 쓰겠다고 잘못 기록하여, 옆에 있는 다른 데이터를 덮어쓸 수 있는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: clk: clk-loongson2: Fix potential buffer overflow in flexible-array member access Flexible-array member `hws` in `struct clk_hw_onecell_data` is annotated with the `counted_by()` attribute. This means that when memory is allocated for this array, the _counter_, which in this case is member `num` in the flexible structure, should be set to the maximum number of elements the flexible array can contain, or fewer. In this case, the total number of elements for the flexible array is determined by variable `clks_num` when allocating heap space via `devm_kzalloc()`, as shown below: 289 struct loongson2_clk_provider *clp; ... 296 for (p = data; p->name; p++) 297 clks_num++; 298 299 clp = devm_kzalloc(dev, struct_size(clp, clk_data.hws, clks_num), 300 GFP_KERNEL); So, `clp->clk_data.num` should be set to `clks_num` or less, and not exceed `clks_num`, as is currently the case. Otherwise, if data is written into `clp->clk_data.hws[clks_num]`, the instrumentation provided by the compiler won't detect the overflow, leading to a memory corruption bug at runtime. Fix this issue by setting `clp->clk_data.num` to `clks_num`.

📍 영향받는 시스템

Linux kernel (loongson2 clk driver 관련 버전)

⚔️ 공격 벡터

잘못된 메모리 크기 설정으로 인한 런타임 메모리 오염 (Local/Kernel level)

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.

🔧 검증 코드

현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel