🇰🇷 한글 설명
Linux 커널의 LoongArch 아키텍처에서 BPF JIT 컴파일 중 메모리 누수가 발생하는 취약점이 발견되었습니다. bpf_int_jit_compile() 호출 시 특정 조건에서 ctx->offset 메모리가 해제되지 않아, JIT 컴파일 실패 시 메모리 누수가 발생합니다.
💡 쉬운 설명
컴퓨터가 프로그램을 실행하기 위해 준비하는 과정에서 사용한 메모리를 제대로 돌려주지 않고 계속 쌓아두는 문제입니다. 이 문제가 반복되면 시스템의 메모리가 부족해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: BPF: Fix memory leak in bpf_jit_free()
When bpf_int_jit_compile() is called for subprograms, it returns early
during the first pass (!prog->is_func || extra_pass is false), keeping
ctx->offset alive for the subsequent extra pass.
If JIT compilation fails for a later subprogram, the BPF core aborts and
calls bpf_jit_free() to clean up the first subprogram. However,
bpf_jit_free() fails to free jit_data->ctx.offset, which causes a memory
leak of the JIT context offsets array.
So fix this by adding the missing kvfree(jit_data->ctx.offset) in
bpf_jit_free().
📍 영향받는 시스템
LoongArch 아키텍처를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
특수하게 조작된 BPF 프로그램을 로드하여 JIT 컴파일 실패를 유도함으로써 메모리 누수 유발
🛡️ 대응 방법
bpf_jit_free() 함수에 kvfree(jit_data->ctx.offset)를 추가하여 메모리 해제 로직이 포함된 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 수정된 최신 패치 버전인지 확인합니다.
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux