🇰🇷 한글 설명
Linux 커널의 bpf_prog_test_run_xdp() 함수에서 참조 카운트 누수(Reference Count Leak)가 발생하는 취약점입니다. 에러 처리 경로에서 참조 카운트를 해제하는 함수를 호출하지 않아 네트워크 장치가 정상적으로 해제되지 않는 문제가 있습니다.
💡 쉬운 설명
프로그램이 사용 중인 자원을 다 쓰고 나서 '이제 안 쓴다'고 알려줘야 하는데, 이 과정을 깜빡하여 자원이 계속 점유되는 문제입니다. 이로 인해 시스템의 네트워크 자원이 고갈되거나 장치가 제대로 꺼지지 않을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix reference count leak in bpf_prog_test_run_xdp()
syzbot is reporting
unregister_netdevice: waiting for sit0 to become free. Usage count = 2
problem. A debug printk() patch found that a refcount is obtained at
xdp_convert_md_to_buff() from bpf_prog_test_run_xdp().
According to commit ec94670fcb3b ("bpf: Support specifying ingress via
xdp_md context in BPF_PROG_TEST_RUN"), the refcount obtained by
xdp_convert_md_to_buff() will be released by xdp_convert_buff_to_md().
Therefore, we can consider that the error handling path introduced by
commit 1c1949982524 ("bpf: introduce frags support to
bpf_prog_test_run_xdp()") forgot to call xdp_convert_buff_to_md().
📍 영향받는 시스템
Linux Kernel (bpf_prog_test_run_xdp 관련 기능이 포함된 버전)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 BPF 테스트 실행 기능을 반복적으로 호출하여 시스템 자원 고갈 유도
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 패치가 적용된 보안 업데이트 버전인지 확인