🇰🇷 한글 설명
Linux 커널의 HID-BPF 모듈에서 hid_hw_request 함수가 반환값의 크기를 검증하지 않아 발생하는 취약점입니다. dispatch_hid_bpf_raw_requests()의 반환값이 임의로 크게 설정되면 버퍼 오버플로우가 발생하여 커널 메모리가 손상될 수 있습니다.
💡 쉬운 설명
Linux 커널의 입력장치 관련 코드에 크기 검증 버그가 있습니다. 악의적으로 조작된 데이터가 메모리 경계를 넘어 다른 메모리를 손상시킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
HID: bpf: prevent buffer overflow in hid_hw_request
right now the returned value is considered to be always valid. However,
when playing with HID-BPF, the return value can be arbitrary big,
because it's the return value of dispatch_hid_bpf_raw_requests(), which
calls the struct_ops and we have no guarantees that the value makes
sense.
📍 영향받는 시스템
Linux kernel 5.10+ (HID-BPF 기능 포함된 모든 버전)
⚔️ 공격 벡터
로컬 공격자가 HID-BPF를 통해 조작된 반환값으로 커널 메모리 오버플로우 유발
🛡️ 대응 방법
Linux 커널을 최신 버전으로 업데이트하여 HID-BPF 버퍼 오버플로우 패치 적용
🔧 검증 코드
CONFIG_HID_BPF=y가 활성화되어 있다면 영향받는 시스템이므로 커널 버전(uname -r)으로 패치 여부를 확인해야 합니다.
grep -i hid /boot/config-$(uname -r) 2>/dev/null | grep -i bpf