vendor:
macOS
by:
Project Zero
8,8
CVSS
HIGH
Type Confusion
843
CWE
Product Name: macOS
Affected Version From: macOS 10.13 (17A405)
Affected Version To: macOS 10.13 (17A405)
Patch Exists: YES
Related CWE: CVE-2017-7156
CPE: o:apple:mac_os_x
Metasploit:
https://www.rapid7.com/db/vulnerabilities/oracle-solaris-cve-2017-7156/, https://www.rapid7.com/db/vulnerabilities/alpine-linux-cve-2017-7156/, https://www.rapid7.com/db/vulnerabilities/gentoo-linux-cve-2017-7156/, https://www.rapid7.com/db/vulnerabilities/suse-cve-2017-7156/, https://www.rapid7.com/db/vulnerabilities/ubuntu-cve-2017-7156/, https://www.rapid7.com/db/vulnerabilities/apple-itunes-cve-2017-7156/, https://www.rapid7.com/db/vulnerabilities/apple-safari-cve-2017-7156/, https://www.rapid7.com/db/vulnerabilities/freebsd-cve-2017-7156/
Other Scripts:
N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References:
N/A
Nuclei Metadata: N/A
Platforms Tested: macOS
2017
Type Confusion in necp_get_socket_attributes()
When getsockopt() is called on any socket with level SOL_SOCKET and optname SO_NECP_ATTRIBUTES, necp_get_socket_attributes is invoked. necp_get_socket_attributes() unconditionally calls sotoinpcb(so) which causes type confusion if so->so_pcb is of an unexpected type (because the socket is not an IPv4/IPv6 socket). To trigger this bug, compile the code, run it, and cause some system activity, e.g. by launching the browser (the PoC won't crash if so->so_pcb contains NULLs in the right spots).
Mitigation:
Upgrade to the latest version of macOS