CVE-2017-2370 : Détail

CVE-2017-2370

7.8
/
Haute
Overflow
70.91%V4
Local
2017-02-20
07h35 +00:00
2017-09-01
07h57 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

An issue was discovered in certain Apple products. iOS before 10.2.1 is affected. macOS before 10.12.3 is affected. tvOS before 10.1.1 is affected. watchOS before 3.1.3 is affected. The issue involves the "Kernel" component. It allows attackers to execute arbitrary code in a privileged context or cause a denial of service (buffer overflow) via a crafted app.

Informations du CVE

Faiblesses connexes

CWE-ID Nom de la faiblesse 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.

Métriques

Métriques Score Gravité CVSS Vecteur 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 est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.

Score EPSS

Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.

Percentile EPSS

Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.

Informations sur l'Exploit

Exploit Database EDB-ID : 41163

Date de publication : 2017-01-25 23h00 +00:00
Auteur : Google Security Research
EDB Vérifié : Yes

Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=1004 mach_voucher_extract_attr_recipe_trap is a mach trap which can be called from any context Here's the code: kern_return_t mach_voucher_extract_attr_recipe_trap(struct mach_voucher_extract_attr_recipe_args *args) { ipc_voucher_t voucher = IV_NULL; kern_return_t kr = KERN_SUCCESS; mach_msg_type_number_t sz = 0; if (copyin(args->recipe_size, (void *)&sz, sizeof(sz))) <---------- (a) return KERN_MEMORY_ERROR; if (sz > MACH_VOUCHER_ATTR_MAX_RAW_RECIPE_ARRAY_SIZE) return MIG_ARRAY_TOO_LARGE; voucher = convert_port_name_to_voucher(args->voucher_name); if (voucher == IV_NULL) return MACH_SEND_INVALID_DEST; mach_msg_type_number_t __assert_only max_sz = sz; if (sz < MACH_VOUCHER_TRAP_STACK_LIMIT) { /* keep small recipes on the stack for speed */ uint8_t krecipe[sz]; if (copyin(args->recipe, (void *)krecipe, sz)) { kr = KERN_MEMORY_ERROR; goto done; } kr = mach_voucher_extract_attr_recipe(voucher, args->key, (mach_voucher_attr_raw_recipe_t)krecipe, &sz); assert(sz <= max_sz); if (kr == KERN_SUCCESS && sz > 0) kr = copyout(krecipe, (void *)args->recipe, sz); } else { uint8_t *krecipe = kalloc((vm_size_t)sz); <---------- (b) if (!krecipe) { kr = KERN_RESOURCE_SHORTAGE; goto done; } if (copyin(args->recipe, (void *)krecipe, args->recipe_size)) { <----------- (c) kfree(krecipe, (vm_size_t)sz); kr = KERN_MEMORY_ERROR; goto done; } kr = mach_voucher_extract_attr_recipe(voucher, args->key, (mach_voucher_attr_raw_recipe_t)krecipe, &sz); assert(sz <= max_sz); if (kr == KERN_SUCCESS && sz > 0) kr = copyout(krecipe, (void *)args->recipe, sz); kfree(krecipe, (vm_size_t)sz); } kr = copyout(&sz, args->recipe_size, sizeof(sz)); done: ipc_voucher_release(voucher); return kr; } Here's the argument structure (controlled from userspace) struct mach_voucher_extract_attr_recipe_args { PAD_ARG_(mach_port_name_t, voucher_name); PAD_ARG_(mach_voucher_attr_key_t, key); PAD_ARG_(mach_voucher_attr_raw_recipe_t, recipe); PAD_ARG_(user_addr_t, recipe_size); }; recipe and recipe_size are userspace pointers. At point (a) four bytes are read from the userspace pointer recipe_size into sz. At point (b) if sz was less than MACH_VOUCHER_ATTR_MAX_RAW_RECIPE_ARRAY_SIZE (5120) and greater than MACH_VOUCHER_TRAP_STACK_LIMIT (256) sz is used to allocate a kernel heap buffer. At point (c) copyin is called again to copy userspace memory into that buffer which was just allocated, but rather than passing sz (the validate size which was allocated) args->recipe_size is passed as the size. This is the userspace pointer *to* the size, not the size! This leads to a completely controlled kernel heap overflow. Tested on MacOS Sierra 10.12.1 (16B2555) Exploit for iOS 10.2 iPod Touch 6G 14C92 gets kernel arbitrary r/w Proof of Concept: https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/41163.zip

Products Mentioned

Configuraton 0

Apple>>Iphone_os >> Version To (excluding) 10.2.1

Configuraton 0

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

Configuraton 0

Apple>>Watchos >> Version To (excluding) 3.1.3

Configuraton 0

Apple>>Tvos >> Version To (excluding) 10.1.1

Références

https://www.exploit-db.com/exploits/41163/
Tags : exploit, x_refsource_EXPLOIT-DB
https://support.apple.com/HT207487
Tags : x_refsource_CONFIRM
https://support.apple.com/HT207483
Tags : x_refsource_CONFIRM
http://www.securityfocus.com/bid/95731
Tags : vdb-entry, x_refsource_BID
https://support.apple.com/HT207485
Tags : x_refsource_CONFIRM
https://support.apple.com/HT207482
Tags : x_refsource_CONFIRM
http://www.securitytracker.com/id/1037668
Tags : vdb-entry, x_refsource_SECTRACK