
New Video from @BlackHatOfficialYT: Deep Dive into WebAssembly and JavaScript Vulnerabilities in Chrome's V8 Engine
In this video, Nang, also known as Sakura in the security community, and Jan Hansa, a master's student at the University of Chinua and a security researcher, present a technical analysis of vulnerabilities between WebAssembly and JavaScript in Chrome's V8 engine. They begin by introducing themselves and their company, Innovate, a cybersecurity firm specializing in integrated offensive and defensive security solutions.
The video focuses on specific vulnerabilities in the interaction between WebAssembly and JavaScript, highlighting the growing risks associated with WebAssembly. They explain that while WebAssembly is rapidly developing with new proposals and features, it also introduces new vulnerabilities. Their research concentrates on the critical bridging layer between the two execution environments, known as "wrappers," which manages inter-language interactions, including imports and exports.
The presenters discuss several vulnerability models, including type confusion between WebAssembly and JavaScript objects. They explain how their fuzzer, an automated testing tool, has been enhanced to generate valid test cases using type, scope, and context analyses. This allows for more significant code mutations and the discovery of specific vulnerabilities.
They detail two type confusion vulnerabilities discovered, one related to inserting WebAssembly objects into JavaScript's prototype chain, and the other concerning compilation optimization and type checks. They demonstrate how these vulnerabilities can be exploited to cause type errors and memory confusions, and how Chrome has addressed these issues by strengthening type checks.
Another vulnerability discussed involves the handling of the property optimization cache (Store IC) in V8. WebAssembly objects are designed to be opaque, but a flaw allows Store IC to mishandle object types, leading to memory errors and out-of-bounds access. They show how this vulnerability can be exploited to arbitrarily read and write memory, enabling remote code execution.
The video also addresses a use-after-free vulnerability in WebAssembly's garbage collection mechanism. They explain how JavaScript functions imported into WebAssembly can cause memory reference errors during garbage collection, and how this vulnerability was fixed by tracking code references in WebAssembly's internal functions.
Finally, they discuss vulnerabilities related to the integration of JavaScript promises (JSPI) in WebAssembly. JSPI allows WebAssembly to call asynchronous JavaScript functions and handle promises, but it also introduces new security risks. They demonstrate how type confusion between V8's internal structures can be exploited to manipulate code execution and potentially achieve arbitrary code execution.
In conclusion, the video highlights critical security risks at the boundary between WebAssembly and JavaScript, emphasizing the importance of continuous research and fuzz testing to discover and fix these vulnerabilities. Enhancements to their fuzzer, such as integrating JSPI mutations and analyzing inter-language interactions, have uncovered previously unknown security flaws.
To learn more, watch the full video at the following address: https://www.youtube.com/watch?v=3mBm0LuliYo