CVE-2018-5821 in Androidinfo

Summary

by MITRE

In Qualcomm Android for MSM, Firefox OS for MSM, and QRD Android with all Android releases from CAF using the Linux kernel before security patch level 2018-04-05, in function wma_wow_wakeup_host_event(), wake_info->vdev_id is received from FW and is used directly as array index to access wma->interfaces whose max index should be (max_bssid-1). If wake_info->vdev_id is greater than or equal to max_bssid, an out-of-bounds read occurs.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 01/21/2020

This vulnerability exists in Qualcomm Android, Firefox OS for MSM, and QRD Android implementations that utilize the Linux kernel with all Android releases from CAF before the security patch level 2018-04-05. The flaw resides in the function wma_wow_wakeup_host_event() where the system receives wake_info->vdev_id from the firmware and directly uses it as an array index to access wma->interfaces. This represents a classic buffer overflow condition that falls under CWE-129, specifically an improper validation of array index. The vulnerability stems from the lack of bounds checking on the vdev_id parameter received from the firmware, which should be validated against the maximum allowed BSSID value before being used as an array indexer.

The technical implementation of this vulnerability allows for an out-of-bounds read condition when wake_info->vdev_id exceeds or equals the max_bssid value. This occurs because the system assumes the firmware will always provide valid indices within the expected range without performing proper validation. The wma->interfaces array has a maximum valid index of (max_bssid-1), but the code does not verify that wake_info->vdev_id falls within this acceptable range before using it as an array access index. This type of vulnerability is categorized under ATT&CK technique T1068, which involves exploiting local system permissions through improper input validation.

The operational impact of this vulnerability is significant as it can potentially allow attackers to read memory locations beyond the intended array boundaries, leading to information disclosure or system instability. An attacker could exploit this by manipulating the firmware to send a malicious vdev_id value that exceeds the maximum BSSID limit, thereby accessing unauthorized memory regions. This could result in sensitive information leakage from the kernel space, potentially including cryptographic keys, session data, or other confidential information stored in the memory locations accessed through the out-of-bounds read. The vulnerability affects devices running vulnerable Android versions and could be exploited during wake-up events when the system processes firmware notifications.

Mitigation strategies should focus on implementing proper input validation before using the vdev_id parameter as an array index. The recommended approach involves adding bounds checking to ensure wake_info->vdev_id is less than max_bssid before using it to access wma->interfaces. This aligns with security best practices and addresses the root cause of the vulnerability by preventing the out-of-bounds memory access. Additionally, system updates should be applied to the security patch level 2018-04-05 or later, which contains the necessary fixes for this vulnerability. Organizations should also consider implementing runtime protections such as stack canaries, address space layout randomization, and memory protection mechanisms to reduce the impact if exploitation occurs. The fix should be integrated into the wireless management subsystem to ensure all firmware wake-up events are properly validated before memory access operations are performed.

Reservation

01/19/2018

Disclosure

04/03/2018

Moderation

accepted

CPE

ready

EPSS

0.00344

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!