🇰🇷 한글 설명
리눅스 커널의 BPF JIT 컴파일러에서 메인 프로그램의 BPF_PSEUDO_FUNC 참조를 적절히 처리하지 못하는 취약점이 발견되었습니다. 이로 인해 메인 프로그램의 주소를 참조할 경우 실제 주소가 아닌 잘못된 주소를 호출하게 되어 시스템 오류나 보안 문제가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터 프로그램이 실행될 때 자기 자신의 위치를 잘못 기억하여 엉뚱한 곳으로 점프하는 버그입니다. 이로 인해 프로그램이 갑자기 멈추거나 해커가 의도한 동작을 수행할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: reject BPF_PSEUDO_FUNC reference to the main program
fixups.c:jit_subprogs() rewrites BPF_PSEUDO_FUNC loads to contain real
function addresses. This function is invoked from bpf_jit_subprogs()
only when env->subprog_cnt > 1. Meaning that for any program like
below:
int main(void *ctx) {
void *ptr = main;
...
bpf_timer_set_callback(..., ptr);
...
}
The 'ptr' won't be ever converted to contain an address.
In combination with e.g. bpf_timer_set_callback() this would lead to a
function call at a bogus address.
Instead of complicating the implementation, just assume that no useful
program needs main to be a sync or async callback and reject
BPF_PSEUDO_FUNC loads for the main subprogram.
📍 영향받는 시스템
BPF JIT 컴파일러를 사용하는 리눅스 커널 버전
⚔️ 공격 벡터
특수하게 조작된 BPF 프로그램을 로드하여 메인 프로그램의 주소를 잘못된 콜백 함수로 전달
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.