🇰🇷 한글 설명
Linux 커널의 fprobe 구성 요소에서 ftrace_ops가 등록 해제된 후에도 rethook이 적절히 해제되지 않아 발생하는 취약점입니다. 이로 인해 BPF 셀프 테스트 실행 중 잘못된 메모리 주소에 접근하여 일반 보호 오류(General Protection Fault)가 발생할 수 있습니다.
💡 쉬운 설명
프로그램이 사용 중인 메모리를 너무 빨리 삭제해버려서 컴퓨터 시스템이 충돌하거나 오류를 일으키는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 비정상적으로 종료될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fprobe: Release rethook after the ftrace_ops is unregistered
While running bpf selftests it's possible to get following fault:
general protection fault, probably for non-canonical address \
0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC NOPTI
...
Call Trace:
<TASK>
fprobe_handler+0xc1/0x270
? __pfx_bpf_testmod_init+0x10/0x10
? __pfx_bpf_testmod_init+0x10/0x10
? bpf_fentry_test1+0x5/0x10
? bpf_fentry_test1+0x5/0x10
? bpf_testmod_init+0x22/0x80
? do_one_initcall+0x63/0x2e0
? rcu_is_watching+0xd/0x40
? kmalloc_trace+0xaf/0xc0
? do_init_module+0x60/0x250
? __do_sys_finit_module+0xac/0x120
? do_syscall_64+0x37/0x90
? entry_SYSCALL_64_after_hwframe+0x72/0xdc
</TASK>
In unregister_fprobe function we can't release fp->rethook while it's
possible there are some of its users still running on another cpu.
Moving rethook_free call after fp->ops is unregistered with
unregister_ftrace_function call.
📍 영향받는 시스템
fprobe 및 BPF 기능을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
BPF 셀프 테스트 또는 특정 커널 모듈 로드 과정을 통한 메모리 손상 유도
🛡️ 대응 방법
fprobe의 rethook 해제 시점을 unregister_ftrace_function 호출 이후로 수정하여 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인하십시오.