In an effort to improve Chrome's resilience to memory issues, Google adds into your V8 sandbox browser, and now security researchers can look for vulnerabilities in it.
Chrome has suffered from memory safety issues in recent years, most of which were related to the V8 JavaScript engine. Moreover, in the case of V8, the usual means of protection (using hardware security mechanisms or switching to a more memory-safe language, for example, Rust), unfortunately, do not help.
“Almost all vulnerabilities found and exploited in V8 today have one thing in common: memory corruption necessarily occurs within the V8 heap, since the compiler and runtime almost always operate exclusively on V8 HeapObject instances,” Google says.
The new V8 sandbox isolates heap memory to prevent corruption of other parts of the process's memory. Since there is no suitable hardware for this purpose, Google decided to implement the sandbox in software.
“The basic idea of a software sandbox is to replace all data types that can access memory outside the sandbox with sandbox-compatible alternatives. In particular, all pointers (both to objects in the V8 heap and elsewhere) and 64-bit sizes must be removed, since an attacker could corrupt them to subsequently access other memory,” the developers say.
According to experts, in real-life attack scenarios, attackers will not be able to escape the sandbox and reach other parts of the process memory, so they will first need to bypass the V8 sandbox, which will significantly complicate the task.
Originally proposed back in 2021, sandboxing for V8 is now considered a viable security feature, and Google has already implemented it in Chrome 123 for testing purposes. The company also added a sandbox to the bug bounty program Chrome Vulnerability Rewards Programso that security system developers and researchers can identify flaws and vulnerabilities in it.
According to Google, all the problems identified to date are trivial memory corruption bugs that are not difficult to prevent or mitigate, unlike the more serious bugs typically found in V8.
It also notes that V8 sandboxing accounts for only 1% (or less) of resource consumption under typical workloads, meaning it may be enabled by default on compatible platforms. For the past two weeks, the V8 sandbox has been active by default on 64-bit versions of Chrome for Android, ChromeOS, Linux, macOS, and Windows, primarily to test stability and collect performance statistics.