ID

VAR-201804-1056


CVE

CVE-2017-7065


TITLE

plural Apple Product Wi-Fi Vulnerability in arbitrary code execution in components

Trust: 0.8

sources: JVNDB: JVNDB-2017-013140

DESCRIPTION

An issue was discovered in certain Apple products. iOS before 10.3.3 is affected. macOS before 10.12.6 is affected. tvOS before 10.2.2 is affected. The issue involves the "Wi-Fi" component. It allows remote attackers to execute arbitrary code (on the Wi-Fi chip) or cause a denial of service (memory corruption) by leveraging proximity for 802.11. Google Android is prone to multiple security vulnerabilities. An attacker can leverage these issues to execute arbitrary code, gain sensitive information or gain elevated privileges. Failed exploit attempts may result in a denial of service condition. Broadcom: Heap overflow when handling 802.11v WNM Sleep Mode Response CVE-2017-7065 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. In order to allow clients to configure themselves within a wireless network and exchange information about the network topology, peers support an additional set of standards called "Wireless Network Management" (WNM) 802.11v. Much of the information related to WNM is transferred by means of Wi-Fi Action Frames, using the WNM category (10). One such frame which is handled by Broadcom's firmware is the "WNM Sleep Mode Response" frame, which has following general structure: --------------------------------------------------------------------------- | Category (10) | Action (17) | Dialog Token | Key Data Length | Key Data | --------------------------------------------------------------------------- 0 1 2 3 5 5 + Key Data Length (See 802.11-2016, 9.6.14.20 for more information). On the BCM4355C0 SoC with firmware version 9.44.78.27.0.1.56 the WNM Sleep Mode Response frame is handled by ROM function 0xC8380. This function verifies the dialog token (although that is a single byte field, so it can be easily brute-forced by an attacker if they do not know it in advance). Then, the function verifies that the "Key Data Length" field does not exceed the total frame's length. After performing these verifications, it calls an internal function (ROM 0xC8480) to install the GTK/IGTK. This function has the following approximate high-level logic: int function_C8480(..., uint8_t* body, int len) { //Validations uint8_t ie_len = body[1]; if (!len) return 0; if (ie_len + 1 >= len) return -1; ... //Handle IGTK if (body[0] == 1) { ... } //Handle GTK else if (body[0] == 0) { uint8_t gtk_len = body[4]; if ( ie_len != gtk_len + 11 ) return -1; function_BC804(..., gtk_len, body + 13, ...); } ... } As shown in the snippet above, the function validates that the length of the GTK in the embedded IE does not exceed the length of the IE itself (plus the metadata). However, the real restriction on the length of the GTK should be much shorter (in fact, I believe the maximal key size in 802.11 is restricted to 32 bytes). This possibly large GTK is then passed to an additional function which copies the GTK into a context structure, before passing it to an addition function in order to actually install the key: int function_BC804(..., int gtk_len, char* gtk, ...) { ... context_struct->gtk_len = gtk_len; ... memcpy(context_struct->gtk, gtk, gtk_len); return function_C9C14(..., context_struct->gtk, context_struct->gtk_len, ...); } int function_C9C14(..., char* gtk, int gtk_len, ...) { ... char* key_buffer = malloc(164); ... memcpy(key_buffer + 8, gtk, gtk_len); ... } As we can see above, the GTK is eventually copied into a heap buffer of size 164. Due to the validations performed above, the following restrictions apply: (1) Key Data Length + 5 < Frame Length (2) IE Length + 11 == GTK Length Therefore an attacker can set the "Key Data Length" field correctly, set "IE Length" to 255, and set the "GTK Length" to 244. By doing so, the GTK will be copied out of bounds into the heap buffer allocated in function_C9C14, thereby overflowing the heap chunk with attacker controlled data. I've been able to verify that this code path exists on various different firmware versions, including those present on the iPhone 7, Galaxy S7 Edge and the Nexus 6P. This bug is subject to a 90 day disclosure deadline. If 90 days elapse without a broadly available patch, then the bug report will automatically become visible to the public. Found by: laginimaineb

Trust: 2.16

sources: NVD: CVE-2017-7065 // JVNDB: JVNDB-2017-013140 // BID: 100655 // VULHUB: VHN-115268 // VULMON: CVE-2017-7065 // PACKETSTORM: 144326

AFFECTED PRODUCTS

vendor:applemodel:mac os xscope:eqversion:10.12.5

Trust: 1.4

vendor:applemodel:iphone osscope:ltversion:10.3.3

Trust: 1.0

vendor:applemodel:tvosscope:ltversion:10.2.2

Trust: 1.0

vendor:applemodel:mac os xscope:ltversion:10.12.6

Trust: 1.0

vendor:applemodel:iosscope:ltversion:10.3.3 (ipad first 4 after generation )

Trust: 0.8

vendor:applemodel:iosscope:ltversion:10.3.3 (iphone 5 or later )

Trust: 0.8

vendor:applemodel:iosscope:ltversion:10.3.3 (ipod touch first 6 generation )

Trust: 0.8

vendor:applemodel:tvosscope:ltversion:10.2.2 (apple tv first 4 generation )

Trust: 0.8

vendor:applemodel:mac os xscope:eqversion:10.11.4

Trust: 0.6

vendor:applemodel:mac os xscope:eqversion:10.12.2

Trust: 0.6

vendor:applemodel:mac os xscope:eqversion:10.12.3

Trust: 0.6

vendor:applemodel:mac os xscope:eqversion:10.12.1

Trust: 0.6

vendor:applemodel:mac os xscope:eqversion:10.12.0

Trust: 0.6

vendor:applemodel:mac os xscope:eqversion:10.11.5

Trust: 0.6

vendor:applemodel:mac os xscope:eqversion:10.11.6

Trust: 0.6

vendor:applemodel:mac os xscope:eqversion:10.11.3

Trust: 0.6

vendor:applemodel:mac os xscope:eqversion:10.12.4

Trust: 0.6

vendor:googlemodel:pixel xlscope:eqversion:0

Trust: 0.3

vendor:googlemodel:pixel cscope:eqversion:0

Trust: 0.3

vendor:googlemodel:pixelscope:eqversion:0

Trust: 0.3

vendor:googlemodel:nexus playerscope:eqversion:0

Trust: 0.3

vendor:googlemodel:nexusscope:eqversion:9

Trust: 0.3

vendor:googlemodel:nexus 6pscope: - version: -

Trust: 0.3

vendor:googlemodel:nexusscope:eqversion:6

Trust: 0.3

vendor:googlemodel:nexusscope:eqversion:5x

Trust: 0.3

vendor:googlemodel:androidscope:eqversion:0

Trust: 0.3

sources: BID: 100655 // JVNDB: JVNDB-2017-013140 // CNNVD: CNNVD-201804-207 // NVD: CVE-2017-7065

CVSS

SEVERITY

CVSSV2

CVSSV3

nvd@nist.gov: CVE-2017-7065
value: HIGH

Trust: 1.0

NVD: CVE-2017-7065
value: HIGH

Trust: 0.8

CNNVD: CNNVD-201804-207
value: HIGH

Trust: 0.6

VULHUB: VHN-115268
value: MEDIUM

Trust: 0.1

VULMON: CVE-2017-7065
value: MEDIUM

Trust: 0.1

nvd@nist.gov: CVE-2017-7065
severity: MEDIUM
baseScore: 5.8
vectorString: AV:A/AC:L/AU:N/C:P/I:P/A:P
accessVector: ADJACENT_NETWORK
accessComplexity: LOW
authentication: NONE
confidentialityImpact: PARTIAL
integrityImpact: PARTIAL
availabilityImpact: PARTIAL
exploitabilityScore: 6.5
impactScore: 6.4
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 1.9

VULHUB: VHN-115268
severity: MEDIUM
baseScore: 5.8
vectorString: AV:A/AC:L/AU:N/C:P/I:P/A:P
accessVector: ADJACENT_NETWORK
accessComplexity: LOW
authentication: NONE
confidentialityImpact: PARTIAL
integrityImpact: PARTIAL
availabilityImpact: PARTIAL
exploitabilityScore: 6.5
impactScore: 6.4
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 0.1

nvd@nist.gov: CVE-2017-7065
baseSeverity: HIGH
baseScore: 8.8
vectorString: CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
attackVector: ADJACENT
attackComplexity: LOW
privilegesRequired: NONE
userInteraction: NONE
scope: UNCHANGED
confidentialityImpact: HIGH
integrityImpact: HIGH
availabilityImpact: HIGH
exploitabilityScore: 2.8
impactScore: 5.9
version: 3.0

Trust: 1.8

sources: VULHUB: VHN-115268 // VULMON: CVE-2017-7065 // JVNDB: JVNDB-2017-013140 // CNNVD: CNNVD-201804-207 // NVD: CVE-2017-7065

PROBLEMTYPE DATA

problemtype:CWE-119

Trust: 1.9

sources: VULHUB: VHN-115268 // JVNDB: JVNDB-2017-013140 // NVD: CVE-2017-7065

THREAT TYPE

remote or local

Trust: 0.6

sources: CNNVD: CNNVD-201804-207

TYPE

buffer error

Trust: 0.6

sources: CNNVD: CNNVD-201804-207

CONFIGURATIONS

sources: JVNDB: JVNDB-2017-013140

PATCH

title:HT207922url:https://support.apple.com/en-us/HT207922

Trust: 0.8

title:HT207923url:https://support.apple.com/en-us/HT207923

Trust: 0.8

title:HT207924url:https://support.apple.com/en-us/HT207924

Trust: 0.8

title:HT207922url:https://support.apple.com/ja-jp/HT207922

Trust: 0.8

title:HT207923url:https://support.apple.com/ja-jp/HT207923

Trust: 0.8

title:HT207924url:https://support.apple.com/ja-jp/HT207924

Trust: 0.8

title:Apple iOS , macOS Sierra and tvOS Wi-Fi Security vulnerabilitiesurl:http://www.cnnvd.org.cn/web/xxk/bdxqById.tag?id=83059

Trust: 0.6

title:Apple: tvOS 10.2.2url:https://vulmon.com/vendoradvisory?qidtp=apple_security_advisories&qid=8ea18aa7d960ba86938d7736a49fedf4

Trust: 0.1

title:Apple: macOS Sierra 10.12.6, Security Update 2017-003 El Capitan, and Security Update 2017-003 Yosemiteurl:https://vulmon.com/vendoradvisory?qidtp=apple_security_advisories&qid=b4587fdf74b78bb8207139ef57386820

Trust: 0.1

title:Apple: iOS 10.3.3url:https://vulmon.com/vendoradvisory?qidtp=apple_security_advisories&qid=ff2b42f631bf42e786d7e9c18a208656

Trust: 0.1

title:Android Security Bulletins: Android Security Bulletin—September 2017url:https://vulmon.com/vendoradvisory?qidtp=android_security_bulletins&qid=45d9f825c1db6d21aee6f02c00c607a0

Trust: 0.1

sources: VULMON: CVE-2017-7065 // JVNDB: JVNDB-2017-013140 // CNNVD: CNNVD-201804-207

EXTERNAL IDS

db:NVDid:CVE-2017-7065

Trust: 3.0

db:BIDid:100655

Trust: 2.1

db:JVNDBid:JVNDB-2017-013140

Trust: 0.8

db:CNNVDid:CNNVD-201804-207

Trust: 0.6

db:PACKETSTORMid:144326

Trust: 0.2

db:SEEBUGid:SSVID-96607

Trust: 0.1

db:VULHUBid:VHN-115268

Trust: 0.1

db:VULMONid:CVE-2017-7065

Trust: 0.1

sources: VULHUB: VHN-115268 // VULMON: CVE-2017-7065 // BID: 100655 // JVNDB: JVNDB-2017-013140 // PACKETSTORM: 144326 // CNNVD: CNNVD-201804-207 // NVD: CVE-2017-7065

REFERENCES

url:http://www.securityfocus.com/bid/100655

Trust: 1.9

url:https://support.apple.com/ht207922

Trust: 1.8

url:https://support.apple.com/ht207923

Trust: 1.8

url:https://support.apple.com/ht207924

Trust: 1.8

url:https://nvd.nist.gov/vuln/detail/cve-2017-7065

Trust: 0.9

url:https://cve.mitre.org/cgi-bin/cvename.cgi?name=cve-2017-7065

Trust: 0.8

url:http://code.google.com/android/

Trust: 0.3

url:https://source.android.com/security/bulletin/2017-09-01

Trust: 0.3

url:https://cwe.mitre.org/data/definitions/119.html

Trust: 0.1

url:https://nvd.nist.gov

Trust: 0.1

url:https://support.apple.com/kb/ht207924

Trust: 0.1

url:https://source.android.com/security/bulletin/2017-09-01.html

Trust: 0.1

sources: VULHUB: VHN-115268 // VULMON: CVE-2017-7065 // BID: 100655 // JVNDB: JVNDB-2017-013140 // PACKETSTORM: 144326 // CNNVD: CNNVD-201804-207 // NVD: CVE-2017-7065

CREDITS

Hao Chen and Guang Gong of Alpha Team, Qihoo 360 Technology Co. Ltd.

Trust: 0.3

sources: BID: 100655

SOURCES

db:VULHUBid:VHN-115268
db:VULMONid:CVE-2017-7065
db:BIDid:100655
db:JVNDBid:JVNDB-2017-013140
db:PACKETSTORMid:144326
db:CNNVDid:CNNVD-201804-207
db:NVDid:CVE-2017-7065

LAST UPDATE DATE

2024-11-23T21:40:24.014000+00:00


SOURCES UPDATE DATE

db:VULHUBid:VHN-115268date:2019-03-08T00:00:00
db:VULMONid:CVE-2017-7065date:2019-03-08T00:00:00
db:BIDid:100655date:2017-09-05T00:00:00
db:JVNDBid:JVNDB-2017-013140date:2018-06-01T00:00:00
db:CNNVDid:CNNVD-201804-207date:2019-03-13T00:00:00
db:NVDid:CVE-2017-7065date:2024-11-21T03:31:06.163

SOURCES RELEASE DATE

db:VULHUBid:VHN-115268date:2018-04-03T00:00:00
db:VULMONid:CVE-2017-7065date:2018-04-03T00:00:00
db:BIDid:100655date:2017-09-05T00:00:00
db:JVNDBid:JVNDB-2017-013140date:2018-06-01T00:00:00
db:PACKETSTORMid:144326date:2017-09-26T00:04:03
db:CNNVDid:CNNVD-201804-207date:2018-04-04T00:00:00
db:NVDid:CVE-2017-7065date:2018-04-03T06:29:01.890