🇰🇷 한글 설명
Linux 커널의 platform/chrome: sensorhub 구성 요소에서 메모리 오버리드(overread) 취약점이 발견되었습니다. 오작동하는 EC 펌웨어를 통해 예상보다 적은 데이터가 전송될 경우, memcpy() 과정에서 버퍼 범위를 벗어난 메모리를 읽을 수 있습니다.
💡 쉬운 설명
기기 내부의 센서 정보를 가져올 때, 실제 데이터 양보다 더 많은 양을 읽으려고 시도하여 시스템 메모리의 잘못된 부분을 읽어내는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 정보가 노출될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
platform/chrome: sensorhub: Fix memory overread in ring handler
`max_response` and `sensor_num` are read from different EC commands:
- `max_response` is from cros_ec_get_proto_info().
ec_dev->max_response = info->max_response_packet_size -
sizeof(struct ec_host_response);
- `sensor_num` is from cros_ec_get_sensor_count().
sensor_num = cros_ec_get_sensor_count(ec);
With a malfunctioning EC firmware, it is possible that the `msg->insize`
(i.e., `fifo_info_length` in the context) could be clamped in
cros_ec_cmd_xfer() because `msg->insize` is greater than `max_response`.
int fifo_info_length =
sizeof(struct ec_response_motion_sense_fifo_info) +
sizeof(u16) * sensorhub->sensor_num;
This means the number of read bytes could be less than expected. As a
result, the subsequent memcpy() in cros_ec_sensorhub_ring_handler()
overreads the `resp->fifo_info` buffer.
Check the return value of cros_ec_cmd_xfer_status() and abort if the
number of bytes read does not match the expected length.
📍 영향받는 시스템
Linux kernel (platform/chrome: sensorhub 관련 모듈 포함 버전)
⚔️ 공격 벡터
오작동하거나 조작된 EC(Embedded Controller) 펌웨어를 통한 데이터 전송 조작
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 cros_ec_cmd_xfer_status()의 반환값 검증 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.