🇰🇷 한글 설명
MSM용 Android, Firefox OS, QRD Android 및 CAF Linux 커널을 사용하는 모든 Android 버전에서 발생합니다. wma_unified_link_peer_stats_event_handler 함수가 전체 peer_stats의 num_rates 합계를 검증하지 않아, 펌웨어 버퍼를 할당된 버퍼로 복사할 때 버퍼 오버플로우가 발생할 수 있습니다.
💡 쉬운 설명
데이터의 전체 크기를 제대로 확인하지 않고 메모리에 저장하는 과정에서 오류가 발생하는 보안 취약점입니다. 공격자가 조작된 데이터를 보내면 시스템의 메모리를 넘치게 만들어 기기를 오작동시키거나 제어권을 탈취할 수 있습니다.
🇺🇸 원문 (English)
In Android for MSM, Firefox OS for MSM, QRD Android, with all Android releases from CAF using the Linux kernel, wma_unified_link_peer_stats_event_handler function has a variable num_rates which represents the sum of all the peer_stats->num_rates. The current behavior in this function is to validate only the num_rates of the first peer stats (peer_stats->num_rates) against WMA_SVC_MSG_MAX_SIZE, but not the sum of all the peer's num_rates (num_rates) which may lead to a buffer overflow when the firmware buffer is copied in to the allocated buffer (peer_stats) as the size for the memory allocation - link_stats_results_size is based on num_rates.
📍 영향받는 시스템
Android (MSM, QRD, CAF Linux kernel 기반), Firefox OS (MSM)
⚔️ 공격 벡터
조작된 펌웨어 통계 데이터를 전송하여 메모리 버퍼 오버플로우 유도
🛡️ 대응 방법
커널 패치를 통해 num_rates의 전체 합계에 대한 유효성 검사 로직을 추가해야 함
🔧 검증 코드
커널 심볼에서 해당 함수가 존재하는지 확인하여 취약한 함수가 포함된 커널 버전인지 파악합니다.
uname -a && grep -r "wma_unified_link_peer_stats_event_handler" /proc/kallsyms 2>/dev/null