The vulnerable system is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet. Such a vulnerability is often termed “remotely exploitable” and can be thought of as an attack being exploitable at the protocol level one or more network hops away (e.g., across one or more routers). An example of a network attack is an attacker causing a denial of service by sending a specially crafted TCP packet across a wide area network (e.g., CVE-2004-0230).
Attack Complexity
High
AC
The successful attack depends on the evasion or circumvention of security-enhancing techniques in place that would otherwise hinder the attack. These include: Evasion of exploit mitigation techniques. The attacker must have additional methods available to bypass security measures in place. For example, circumvention of address space randomization (ASLR) or data execution prevention must be performed for the attack to be successful. Obtaining target-specific secrets. The attacker must gather some target-specific secret before the attack can be successful. A secret is any piece of information that cannot be obtained through any amount of reconnaissance. To obtain the secret the attacker must perform additional attacks or break otherwise secure measures (e.g. knowledge of a secret key may be needed to break a crypto channel). This operation must be performed for each attacked target.
Privileges Required
None
PR
The attacker is unauthenticated prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.
User Interaction
None
UI
The vulnerable system can be exploited without interaction from any human user, other than the attacker. Examples include: a remote attacker is able to send packets to a target system a locally authenticated attacker executes code to elevate privileges
Scope
Unchanged
S
An exploited vulnerability can only affect resources managed by the same security authority. In the case of a vulnerability in a virtualized environment, an exploited vulnerability in one guest instance would not affect neighboring guest instances.
Confidentiality
High
C
There is total information disclosure, resulting in all data on the system being revealed to the attacker, or there is a possibility of the attacker gaining control over confidential data.
Integrity
High
I
There is a total compromise of system integrity. There is a complete loss of system protection, resulting in the attacker being able to modify any file on the target system.
Availability
High
A
There is a total shutdown of the affected resource. The attacker can deny access to the system or data, potentially causing significant loss to the organization.
Below is a copy: Apple updateRateSetAsyncCallback Heap Overflow
Apple: Heap overflow in "updateRateSetAsyncCallback" when handling ioctl results
CVE-2017-7108
Broadcom produces Wi-Fi HardMAC SoCs which are used to handle the PHY and MAC layer processing. These chips are present in both mobile devices and Wi-Fi routers, and are capable of handling many Wi-Fi related events without delegating to the host OS. On iOS, the "AppleBCMWLANBusInterfacePCIe" driver is used in order to handle the PCIe interface and low-level communication protocols with the Wi-Fi SoC (also referred to as "dongle"). Similarly, the "AppleBCMWLANCore" driver handles the high-level protocols and the Wi-Fi configuration.
Along with the regular flow of frames transferred between the host and the dongle, the two communicate with one another via a set of "ioctls" which can be issued to read or write dongle configuration from the host. This information is exchanged using the "Control Completion" ring, rather than the regular "RX" ring.
When handling certain events, such as link status changes (indicated by the firmware-originated "WLC_E_LINK" event frame), the "AppleBCMWLANCore" driver updates the rate-set. This is done by issuing an asynchronous ioctl to the firwmare using the WLC_GET_CURR_RATESET (114) command code. Upon completion, this ioctl is handled by the "updateRateSetAsyncCallback" function, which performs the following high-level logic:
int64_t updateRateSetAsyncCallback(void* this, ..., uint64_t error_code, void **ptr_to_result_struct) {
void* result_buf = *ptr_to_result_struct;
uint8_t results[0x14];
if (error_code) {
//Handle error...
}
else if (result_buf) {
memmove(results, results_buf, 0x14);
save_rate_set((uint8_t*)this + 2196, results);
...
}
...
}
void save_rate_set(void* this, uint8_t* rate_set_buffer)
{
uint32_t num_entries = *((uint32_t*)rate_set_buffer);
*((uint16_t*)this + 2) = (uint16_t)num_entries;
if (!num_entries)
return;
uint32_t* save_ptr = (uint32_t*)((uint8_t*)this + 16);
uint8_t* rates_array = rate_set_buffer + sizeof(uint32_t);
for (uint32_t i=0; i<num_entries; i++, save_ptr += 3) {
save_ptr[-1] = rates_array[i] & 0x3F;
save_ptr[0] = rates_array[i] >> 7;
}
}
As can be seen above, both "updateRateSetAsyncCallback" and the helper function (named "save_rate_set" in the snippet above) make no attempts to validate the length field returned from the firmware in the ioctl response. As a result, an attacker controlling the firmware may choose an arbitrarily large value. Doing so will cause the copy loop in "save_rate_set" to copy data out-of-bounds into the buffer at (this + 2196). Note that the buffer's length is only 0xBC, but the attacker can cause arbitrarily many bytes to by copied. Since the data is copied from the stack buffer to which the ioctl's results were originally transferred, the OOB bytes will contain information from the stack, removing some degree of control over the copied contents.
This bug is subject to a 90 day disclosure deadline. After 90 days elapse
or a patch has been made broadly available, the bug report will become
visible to the public.
Found by: laginimaineb
This information is provided for TESTING and LEGAL RESEARCH purposes only. All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use and Privacy Policy and Impressum