🔍 CVE-2024-27050

7.8
CVSS Score
HIGH
2024-05-01
2026-08-04 11:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 libbpf 라이브러리에서 bpf_xdp_query_opts 구조체 처리 시 OPTS_SET() 매크로를 사용하지 않아 발생하는 취약점입니다. 이로 인해 이전 버전의 libbpf로 컴파일된 프로그램이 실행될 때 구조체 크기 차이로 인한 스택 오버플로우 및 메모리 손상이 발생할 수 있습니다.

💡 쉬운 설명

프로그램이 사용하는 데이터 상자의 크기가 실제보다 작을 때, 시스템이 상자 밖으로 데이터를 써버려서 메모리가 망가지는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: libbpf: Use OPTS_SET() macro in bpf_xdp_query() When the feature_flags and xdp_zc_max_segs fields were added to the libbpf bpf_xdp_query_opts, the code writing them did not use the OPTS_SET() macro. This causes libbpf to write to those fields unconditionally, which means that programs compiled against an older version of libbpf (with a smaller size of the bpf_xdp_query_opts struct) will have its stack corrupted by libbpf writing out of bounds. The patch adding the feature_flags field has an early bail out if the feature_flags field is not part of the opts struct (via the OPTS_HAS) macro, but the patch adding xdp_zc_max_segs does not. For consistency, this fix just changes the assignments to both fields to use the OPTS_SET() macro.

📍 영향받는 시스템

libbpf 라이브러리를 사용하는 Linux 커널 기반 시스템 (특정 버전 미만)

⚔️ 공격 벡터

이전 버전의 libbpf로 컴파일된 BPF 프로그램을 로드하여 메모리 경계를 넘어서는 쓰기 동작 유도

🛡️ 대응 방법

libbpf 라이브러리가 포함된 Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트

🔧 검증 코드

현재 실행 중인 커널 버전과 관련 라이브러리 버전을 확인하여 보안 패치 적용 여부를 제조사 공지사항과 대조

Shell / Script
uname -r && dpkg -l | grep linux-libc-dev 2>/dev/null || rpm -q kernel

📊 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