🇰🇷 한글 설명
Linux 커널의 i2c-hid 드라이버에서 i2c_hid_get_report() 함수 호출 시 버퍼 오버플로우가 발생할 수 있는 취약점이 발견되었습니다. 사용자 공간의 hidraw 드라이버를 통해 전달된 데이터 길이가 할당된 버퍼 크기를 초과할 수 있어 이를 방지하기 위한 길이 제한 로직이 추가되었습니다.
💡 쉬운 설명
입력받은 데이터의 크기가 컴퓨터가 준비한 저장 공간보다 클 경우, 넘쳐흐른 데이터가 시스템의 다른 부분을 망가뜨릴 수 있는 문제입니다. 이로 인해 시스템 오류나 보안 문제가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
HID: i2c-hid: fix potential buffer overflow in i2c_hid_get_report()
`i2c_hid_xfer` is used to read `recv_len + sizeof(__le16)` bytes of data
into `ihid->rawbuf`.
The former can come from the userspace in the hidraw driver and is only
bounded by HID_MAX_BUFFER_SIZE(16384) by default (unless we also set
`max_buffer_size` field of `struct hid_ll_driver` which we do not).
The latter has size determined at runtime by the maximum size of
different report types you could receive on any particular device and
can be a much smaller value.
Fix this by truncating `recv_len` to `ihid->bufsize - sizeof(__le16)`.
The impact is low since access to hidraw devices requires root.
📍 영향받는 시스템
Linux kernel (i2c-hid driver 사용 시스템)
⚔️ 공격 벡터
root 권한을 가진 사용자가 hidraw 장치를 통해 조작된 HID 리포트 데이터를 전송
🛡️ 대응 방법
i2c-hid 드라이버의 버퍼 크기 검증 로직이 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 확인