🇰🇷 한글 설명
리눅스 커널의 BPF rbtree 콜백 과정에서 resilient lock kfunc 인자 경로가 루트 락 유지를 강제하지 않는 취약점이 발견되었습니다. 이로 인해 콜백 실행 중 다른 CPU가 노드를 삭제하고 메모리를 해제할 수 있어, 트리 탐색이 해제된 포인터를 참조하게 되는 문제가 발생합니다.
💡 쉬운 설명
데이터를 정렬하는 과정에서 잠금 장치가 제대로 작동하지 않아, 데이터가 갑자기 사라지거나 메모리 오류가 발생할 수 있는 결함입니다. 공격자가 이를 이용해 시스템을 불안정하게 만들거나 잘못된 메모리 접근을 유도할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Reject resilient lock operations in rbtree callbacks
__bpf_rbtree_add() keeps parent and link pointers live across calls to the
program-supplied comparison callback. The verifier therefore requires the
root's lock to remain held throughout the callback.
The helper path enforces this rule for bpf_spin_lock() and
bpf_spin_unlock(), but the resilient lock kfunc argument path does not.
Since resilient locks may protect BPF rbtree roots, a callback can release
the root lock and let another CPU remove and free the node referenced by
the in-progress tree walk. The walk then resumes using freed pointers.
Reject resilient lock kfuncs in an rbtree comparison callback, matching
the existing policy for the spin lock helpers. Resilient-lock-protected
trees remain valid when their comparison callbacks leave lock state alone.
📍 영향받는 시스템
resilient lock kfunc를 사용하는 Linux kernel (버전 미상)
⚔️ 공격 벡터
BPF rbtree 콜백 내에서 resilient lock을 사용하여 루트 락을 해제함으로써 메모리 해제 후 사용(Use-After-Free) 유도
🛡️ 대응 방법
resilient lock kfuncs를 rbtree 비교 콜백에서 거부하도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 최신 보안 패치 버전인지 확인