🔍 CVE-2025-38339

7.8
CVSS Score
HIGH
2025-07-10
2026-07-30 06:23
✅ 완료

🇰🇷 한글 설명

Linux 커널의 powerpc/bpf 아키텍처에서 BPF 트램펄린의 JIT 코드 크기 계산 오류가 발견되었습니다. JIT 컴파일 시 실제 필요한 크기가 계산된 크기보다 클 경우 버퍼 오버플로우가 발생할 수 있는 취약점입니다.

💡 쉬운 설명

컴퓨터가 실행할 코드를 미리 준비하는 과정에서 필요한 공간을 실제보다 작게 계산하는 오류가 있습니다. 이로 인해 준비된 공간을 넘어서는 코드가 작성되어 시스템 오류나 보안 문제가 생길 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: powerpc/bpf: fix JIT code size calculation of bpf trampoline arch_bpf_trampoline_size() provides JIT size of the BPF trampoline before the buffer for JIT'ing it is allocated. The total number of instructions emitted for BPF trampoline JIT code depends on where the final image is located. So, the size arrived at with the dummy pass in arch_bpf_trampoline_size() can vary from the actual size needed in arch_prepare_bpf_trampoline(). When the instructions accounted in arch_bpf_trampoline_size() is less than the number of instructions emitted during the actual JIT compile of the trampoline, the below warning is produced: WARNING: CPU: 8 PID: 204190 at arch/powerpc/net/bpf_jit_comp.c:981 __arch_prepare_bpf_trampoline.isra.0+0xd2c/0xdcc which is: /* Make sure the trampoline generation logic doesn't overflow */ if (image && WARN_ON_ONCE(&image[ctx->idx] > (u32 *)rw_image_end - BPF_INSN_SAFETY)) { So, during the dummy pass, instead of providing some arbitrary image location, account for maximum possible instructions if and when there is a dependency with image location for JIT'ing.

📍 영향받는 시스템

Linux kernel (powerpc architecture)

⚔️ 공격 벡터

특수하게 조작된 BPF 프로그램을 로드하여 JIT 컴파일 과정에서 메모리 오버플로우 유도

🛡️ 대응 방법

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