🇰🇷 한글 설명
Linux 커널의 BPF(Berkeley Packet Filter)에서 RCU 읽기 측 임계 구역이 종료된 후, 신뢰할 수 없는 할당된 객체 포인터를 적절히 거부하지 못하는 취약점이 발견되었습니다. 이로 인해 kfunc가 NULL 포인터나 수명이 다한 메모리를 참조하여 시스템 오류를 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제인 리눅스에서 메모리 주소를 다루는 과정에 실수가 있어, 이미 사라진 데이터나 잘못된 위치를 참조할 수 있는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Reject untrusted allocated-object pointers
When the final RCU read-side critical section ends, a local kptr is demoted
to PTR_UNTRUSTED but retains MEM_ALLOC. The pointer may be NULL or may refer
to an object whose lifetime is no longer protected.
type_is_ptr_alloc_obj() nevertheless recognizes any PTR_TO_BTF_ID with
MEM_ALLOC as a live allocated object. In particular, a refcount-only local
kptr never carries NON_OWN_REF, so it still passes the
bpf_refcount_acquire() argument check after RCU protection ends. The kfunc
can then dereference NULL or stale memory.
Make type_is_ptr_alloc_obj() reject PTR_UNTRUSTED pointers. Since
type_is_non_owning_ref() is based on the same predicate, graph kfunc
arguments obey the same live-object requirement. Fault-protected reads of
the demoted pointer remain valid: writes are already rejected, and read
fixups use bpf_may_fault_on_deref() rather than this predicate.
[ kkd: Rewrote commit log ]
📍 영향받는 시스템
Linux Kernel (BPF 관련 기능이 활성화된 버전)
⚔️ 공격 벡터
신뢰할 수 없는 포인터를 사용하는 BPF 프로그램을 통해 잘못된 메모리 주소에 접근하여 시스템 불안정 유도
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 보안 업데이트 버전인지 확인