Commit 17f3d4a
Jianchun Xu
1607 servicing fixes
This change combined fixes for
CVE-2016-3259, CVE-2016-3260, CVE-2016-3265, CVE-2016-3269, CVE-2016-3271
and MS16-085.
MSFT:7558512: [MSRC 33480] Mitigation Bypass Submission - InterpreterThunkEmitter Bypass CFG
Issue.
InterpreterStackFrame class has a member called interpreterThunk which stores the address of our interpreter function's address (regular or the asmjs one). The hacker took advantage of this address being stored in the heap memory and corrupted the same to reference a vulnerable shell code.
We do not emit a CFG check for this address before calling, because this is a direct call and not an indirect call.
Fix.
This field is replaced with a boolean - to decide between regular/asmjs interpreter thunk. The address of the interpreter function is obtained in the function which is emitting the code, directly.
This code has been present since the beginning - But this has to serviced only for chakra.dll (till th1), as we don't have CFG support before that.
Tests.
MSFT:7424216: [MSRC 33319] Chakra Type Confusion JavascriptArray::InternalCopyNativeFloatArrayElements - Individual
[MSRC] Type confusion bug in ChakraCore JavascriptArray::InternalCopyNativeFloatArrayElements.
MSFT:7527933: [MSRC 33383] Chakra JavascriptArray::ForEachOwnMissingArrayIndexOfObject - Individual
[MSRC] Uninitialized stack variable in ChakraCore JavascriptArray::ForEachOwnMissingArrayIndexOfObject Component. Fix by ensuring stack variable was assigned before using.
MSFT:7572196: [MSRC 33354] Edge Chakra ArrayBuffer.transfer - Zero Day Initiative
Fix malloc/realloc usage in ES6 experimental feature ArrayBuffer.transfer. Should zero extra memory in either malloc or realloc case.
MSFT:7387125 7387131 7387136 7387145 7387150 7424221 7424227: [MSRC 33299] Chakra Type Confusion in JavascriptArray::EntryFrom - Individual
[MSRC] Type Confusion in Array built-ins
DirectSetItemAt() is used in numerous Array built-ins without type-checking, where
new objects may be created through a user-defined constructor.
Fix by adding type-checking for type-specialized helper functions, and replacing
DirectSetItemAt() calls with calls to virtual SetItem() functions where applicable.
MSFT:7424474: [MSRC 33332] Edge ReadAV in chakra!Js::JavascriptOperators::StrictEqual+0x18 - Individual
During sort prep we set orig[i] to missing_item. If an exception occurs in the middle (e.g. in "toString"), orig[i] will remain value missing_item, the Array's has_missing_item state could be wrong (wasn't updated), and the Array's content is also corrupted.
Fixed by removing setting orig[i] to missing_item in prep. Do that after sort completion. (It is required to maintain segment length...end to contain only missing_item value.)1 parent eba8a2f commit 17f3d4a
11 files changed
Lines changed: 390 additions & 131 deletions
File tree
- lib
- Backend
- Runtime
- Base
- Library
- test
- Array
- es6
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
256 | 270 | | |
257 | 271 | | |
258 | 272 | | |
| |||
280 | 294 | | |
281 | 295 | | |
282 | 296 | | |
283 | | - | |
| 297 | + | |
284 | 298 | | |
285 | 299 | | |
286 | 300 | | |
| |||
359 | 373 | | |
360 | 374 | | |
361 | 375 | | |
362 | | - | |
| 376 | + | |
363 | 377 | | |
364 | 378 | | |
365 | 379 | | |
366 | | - | |
| 380 | + | |
367 | 381 | | |
368 | 382 | | |
369 | 383 | | |
370 | 384 | | |
371 | | - | |
| 385 | + | |
372 | 386 | | |
373 | 387 | | |
374 | 388 | | |
| |||
424 | 438 | | |
425 | 439 | | |
426 | 440 | | |
427 | | - | |
| 441 | + | |
428 | 442 | | |
429 | 443 | | |
430 | 444 | | |
| |||
434 | 448 | | |
435 | 449 | | |
436 | 450 | | |
437 | | - | |
| 451 | + | |
438 | 452 | | |
439 | 453 | | |
440 | 454 | | |
441 | 455 | | |
442 | 456 | | |
443 | 457 | | |
444 | | - | |
| 458 | + | |
445 | 459 | | |
446 | 460 | | |
447 | 461 | | |
448 | 462 | | |
449 | 463 | | |
450 | 464 | | |
451 | | - | |
| 465 | + | |
452 | 466 | | |
453 | 467 | | |
454 | 468 | | |
455 | 469 | | |
456 | 470 | | |
457 | 471 | | |
458 | | - | |
| 472 | + | |
459 | 473 | | |
460 | 474 | | |
461 | 475 | | |
| |||
498 | 512 | | |
499 | 513 | | |
500 | 514 | | |
501 | | - | |
| 515 | + | |
502 | 516 | | |
503 | 517 | | |
504 | 518 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1155 | 1155 | | |
1156 | 1156 | | |
1157 | 1157 | | |
1158 | | - | |
1159 | | - | |
| 1158 | + | |
1160 | 1159 | | |
1161 | 1160 | | |
1162 | 1161 | | |
1163 | 1162 | | |
1164 | | - | |
| 1163 | + | |
1165 | 1164 | | |
1166 | 1165 | | |
1167 | 1166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
878 | 878 | | |
879 | 879 | | |
880 | 880 | | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
881 | 904 | | |
882 | 905 | | |
883 | 906 | | |
| |||
940 | 963 | | |
941 | 964 | | |
942 | 965 | | |
943 | | - | |
| 966 | + | |
944 | 967 | | |
945 | 968 | | |
946 | 969 | | |
| |||
949 | 972 | | |
950 | 973 | | |
951 | 974 | | |
952 | | - | |
| 975 | + | |
953 | 976 | | |
954 | 977 | | |
955 | 978 | | |
956 | 979 | | |
957 | | - | |
| 980 | + | |
958 | 981 | | |
959 | 982 | | |
960 | 983 | | |
| |||
0 commit comments