🔍 CVE-2024-26884

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

🇰🇷 한글 설명

Linux 커널의 BPF 해시 테이블 코드에서 roundup_pow_of_two() 함수가 32비트 아키텍처에서 오버플로우를 일으키는 취약점. 정의되지 않은 동작으로 인해 오버플로우 체크가 제대로 작동하지 않으며, 동일한 코드패턴이 DEVMAP_HASH에도 존재.

💡 쉬운 설명

Linux 커널이 메모리 할당 크기를 계산할 때 32비트 컴퓨터에서 수학 계산이 예상과 다르게 동작하는 문제. 이로 인해 잘못된 메모리 크기로 할당되어 커널 에러 또는 정보 누출이 발생 가능.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix hashtab overflow check on 32-bit arches The hashtab 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. So apply the same fix to hashtab, by moving the overflow check to before the roundup.

📍 영향받는 시스템

Linux 커널 32비트 아키텍처 (ARM, x86 등), 특히 BPF가 활성화된 시스템의 eBPF 프로그램 실행 시

⚔️ 공격 벡터

eBPF 프로그램 로드 시 특정 해시 테이블 크기를 지정하여 오버플로우 조건 트리거 (커널 권한 필요할 수 있음)

🛡️ 대응 방법

Linux 커널 패치 적용 - roundup_pow_of_two() 호출 전에 오버플로우 체크 이동

🔧 검증 코드

커널 버전을 확인하여 패치 여부를 확인; 커널 버전이 5.x 이상이면 해당 배포판의 보안 공지와 비교하여 패치 여부 확인

Shell / Script
uname -r | grep -qE '^[45]\.[0-9]+\.[0-9]+' && echo 'Check kernel version against CVE advisory' || echo 'Cannot determine if vulnerable'

📊 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