🔍 CVE-2024-26883

7.8
CVSS Score
HIGH
2024-04-17
2026-10-15 01:17
✅ 완료

🇰🇷 한글 설명

Linux 커널 BPF stackmap 코드에서 32비트 아키텍처에서 roundup_pow_of_two() 함수의 좌측 시프트 연산이 정의되지 않은 동작을 일으켜 오버플로우 체크를 우회할 수 있는 취약점입니다. DEVMAP_HASH 타입도 동일한 취약점을 포함하고 있습니다.

💡 쉬운 설명

Linux 커널의 특정 함수가 32비트 시스템에서 계산 오류를 일으켜 메모리 오버플로우를 감지하지 못합니다. 공격자가 이를 악용해 커널 수준의 접근 권한을 얻을 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix stackmap overflow check on 32-bit arches The stackmap code relies on roundup_pow_of_two() to compute the number of hash buckets, and contains an overflow check by checking if the resulting value is 0. However, on 32-bit arches, the roundup code itself can overflow by doing a 32-bit left-shift of an unsigned long value, which is undefined behaviour, so it is not guaranteed to truncate neatly. This was triggered by syzbot on the DEVMAP_HASH type, which contains the same check, copied from the hashtab code. The commit in the fixes tag actually attempted to fix this, but the fix did not account for the UB, so the fix only works on CPUs where an overflow does result in a neat truncation to zero, which is not guaranteed. Checking the value before rounding does not have this problem.

📍 영향받는 시스템

Linux 커널 5.8 이상의 32비트 아키텍처 (ARM, x86 등)

⚔️ 공격 벡터

로컬 공격자가 BPF 프로그램을 로드하여 stackmap 또는 DEVMAP_HASH 오버플로우를 트리거

🛡️ 대응 방법

Linux 커널을 최신 패치 버전으로 업데이트 (5.15.151, 6.1.88, 6.6.29 이상)

🔧 검증 코드

커널 버전 확인 후 BPF가 활성화되어 있으면 취약점 가능성이 있으며, 패치 버전 이상으로 업데이트 필요

Shell / Script
uname -r && cat /boot/config-$(uname -r) 2>/dev/null | grep CONFIG_BPF

📊 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