🔍 CVE-2025-38591

5.5
CVSS Score
MEDIUM
2025-08-19
2026-10-15 02:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 BPF 검증기(verifier)에서 컨텍스트 구조체의 포인터 필드에 대해 허용되지 않는 좁은 범위의 접근을 제대로 차단하지 못하는 취약점입니다. 이로 인해 잘못된 메모리 접근 시도가 발생하면 커널 경고(kernel warning)가 발생하며 시스템 안정성에 영향을 줄 수 있습니다.

💡 쉬운 설명

컴퓨터의 핵심 운영체제인 리눅스에서 특정 프로그램이 허용되지 않은 방식으로 메모리 데이터를 읽으려 할 때 이를 제대로 막지 못하는 문제입니다. 이로 인해 시스템에 경고가 발생하거나 오류가 생길 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: bpf: Reject narrower access to pointer ctx fields The following BPF program, simplified from a syzkaller repro, causes a kernel warning: r0 = *(u8 *)(r1 + 169); exit; With pointer field sk being at offset 168 in __sk_buff. This access is detected as a narrower read in bpf_skb_is_valid_access because it doesn't match offsetof(struct __sk_buff, sk). It is therefore allowed and later proceeds to bpf_convert_ctx_access. Note that for the "is_narrower_load" case in the convert_ctx_accesses(), the insn->off is aligned, so the cnt may not be 0 because it matches the offsetof(struct __sk_buff, sk) in the bpf_convert_ctx_access. However, the target_size stays 0 and the verifier errors with a kernel warning: verifier bug: error during ctx access conversion(1) This patch fixes that to return a proper "invalid bpf_context access off=X size=Y" error on the load instruction. The same issue affects multiple other fields in context structures that allow narrow access. Some other non-affected fields (for sk_msg, sk_lookup, and sockopt) were also changed to use bpf_ctx_range_ptr for consistency. Note this syzkaller crash was reported in the "Closes" link below, which used to be about a different bug, fixed in commit fce7bd8e385a ("bpf/verifier: Handle BPF_LOAD_ACQ instructions in insn_def_regno()"). Because syzbot somehow confused the two bugs, the new crash and repro didn't get reported to the mailing list.

📍 영향받는 시스템

Linux kernel (BPF verifier 관련 버전)

⚔️ 공격 벡터

조작된 BPF 프로그램을 로드하여 커널 검증기의 논리적 허점을 이용한 메모리 접근 시도

🛡️ 대응 방법

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

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel