🔍 CVE-2026-98799

0.0
CVSS Score
UNKNOWN
2026-10-18
2026-10-19 10:19
✅ 완료

🇰🇷 한글 설명

Linux 커널의 BPF 트램펄린 이미지에서 사용 중인 프로그램이 분리(detach)될 때, 해당 프로그램이 여전히 실행 중인 태스크를 적절히 보호하지 못하는 취약점입니다. 이로 인해 프로그램이 메모리에서 해제된 후에도 태스크가 해당 메모리에 접근하려고 시도하여 시스템 오류(Oops)나 커널 패닉이 발생할 수 있습니다.

💡 쉬운 설명

컴퓨터가 실행 중인 프로그램의 일부를 갑자기 제거했을 때, 아직 그 부분을 사용 중인 다른 작업이 남아 있어 시스템이 충돌하는 문제입니다. 마치 달리는 기차의 선로를 갑자기 빼버려 기차가 탈선하는 것과 비슷합니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: bpf: Skip detached progs in trampoline images that are still in use bpf_tramp_image_put() makes sure a trampoline image is not freed while a task may still be running in it, but nothing similar is done for the progs called by that image. Detach drops the last prog reference right away and the prog is freed after grace periods, on the basis that a task still in the traced function skips the fexit progs once the nop at ip_after_call is patched to a jump. That leaves out a task sleeping in a sleepable prog that runs before the detached one, which no grace period waits for: CPU 0 CPU 1 in image I, sleeping in prog S detach P from I's trampoline -> new image, bpf_tramp_image_put(I) bpf_prog_put(P), last ref grace periods, P freed back from S __bpf_prog_enter(P) call P->bpf_func If S and P are fexit progs the task is already past the patched jump, and fentry only images don't have one. On x86 this is an int3 in poisoned bpf_prog_pack memory: Oops: int3: 0000 [#1] SMP NOPTI CPU: 18 UID: 0 PID: 94573 Comm: x169 Not tainted 6.18.44 #1 PREEMPT(lazy) RIP: 0010:0xffffffffc0601d8d Call Trace: <TASK> ? bpf_trampoline_6442515411+0x1a4/0x21b bpf_lsm_bprm_committed_creds+0x5/0x10 security_bprm_committed_creds+0x5f/0x70 begin_new_exec+0x2d6/0x410 ... We hit this in production when progs attached through trampolines got detached while their hooks were busy, and it was independently found with a fuzzer and KASAN. Have the JITs emit a patchable nop in front of each prog call sequence and record it in the image. When a prog is detached, patch its nop to a jump over the call sequence. Progs that stay attached keep running for the tasks that are in the image, and ip_after_call isn't needed anymore. The task can be in any image that isn't freed yet, not only in the current one. It sleeps in image I1 that calls S, P and Q, then P is detached and the trampoline moves to image I2, then Q is detached and its call is still in I1. So the trampoline keeps a list of its images until they are freed, and detaching a prog patches its nop in all of them. Images hold a reference on the trampoline for that long. On riscv and loongarch a jump of any range takes several instructions, and a task preempted in the middle of them could resume into half of the new sequence. The nop is a single instruction there, patched to a near branch through arch_bpf_trampoline_skip(). With the extra nops, BPF_MAX_TRAMP_LINKS progs no longer fit in a page on x86 and arm64 (and already didn't on powerpc), so lower the limit there like s390 does.

📍 영향받는 시스템

Linux kernel (BPF trampoline 기능을 사용하는 버전)

⚔️ 공격 벡터

로컬 권한을 가진 공격자가 BPF 프로그램을 조작하여 트램펄린 이미지에서 프로그램을 분리함으로써 커널 메모리 오류 유도

🛡️ 대응 방법

JIT 컴파일러가 패치 가능한 NOP를 생성하고 트램펄린 이미지가 참조를 유지하도록 수정된 최신 Linux 커널로 업데이트

🔧 검증 코드

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

Shell / Script
uname -r

💻 영향받는 소프트웨어

Linux Kernel