vendor:
N/A
by:
Anonymous
7.5
CVSS
HIGH
Use-after-free
416
CWE
Product Name: N/A
Affected Version From: N/A
Affected Version To: N/A
Patch Exists: NO
Related CWE: N/A
CPE: N/A
Metasploit:
N/A
Other Scripts:
N/A
Platforms Tested: N/A
2020
UaF caused by missing GetIndexedPropertyStorage in doesGC function
The doesGC function is used to determine whether to insert write barriers, but it is missing GetIndexedPropertyStorage which can cause a garbage collection via rope strings. This can lead to a Use-after-free vulnerability. The PoC creates an array of 10 strings, each of which is composed of two strings of length 1024*1024*2. It then calls the opt function which performs a number of string operations on the array. After that, it calls gc() to trigger garbage collection. Finally, it calls opt again and assigns the result to o.x. When the program prints o.x, it prints 1234, which is the value of tmp.
Mitigation:
Ensure that the doesGC function includes GetIndexedPropertyStorage.