“Unsafe” Code Uncovered in Chrome Browser (and Chromium-Based Browsers)
Google has identified “unsafe” code in the Chromium web browser engine. This flaw introduces a potential vulnerability that effects Google Chrome, as well as all Chromium-based web browsers.
Engineers identified an issue in its Chrome web browser that may permit poorly written code to allow access to data stored in active (RAM) memory. This was first published on Google’s Chromium Project website.
Google explains that the issue is inherent in the programming languages C and C++, of which neither “…come[s] with restrictions or warnings to prevent or alert developers when they're making basic memory management errors. These early coding errors result in memory management vulnerabilities being introduced in applications.” (“Google Just Gave Millions Of Users A Reason To Quit Chrome.” Forbes. 29 May 2020.)
This implicates that both C and C++ provide programmers with a means of allocating RAM memory to carry out functions. Once the memory is no longer needed, the program can release the memory back to the operating system. However, the release of the memory addresses does not purge the content of that memory, making the content available for malicious programs to access. The previous paragraph explains that neither C nor C++ have mechanisms to warn programmers of these types of memory management errors. Most programs have a “garbage collection” function that cleans up memory after use.
Google explains that over 70% of its high-severity security bugs are attributed to this fault, represented by “other memory unsafety” and “use after free” in the chart below:
(Source: “Memory safety.” The Chromium Projects. Web. 29 May 2020.)
This identified flaw affects all Chromium-based browsers, including Opera, Brave, and Microsoft Edge. As Samsung Internet on the Android mobile operating system is Chromium-based, it is possible that it may also be affected by this bug.
Our Take
As a short-term solution, Chrome version 84 will be released on July 14, 2020, which attempts to mitigate the risk by controlling abusive permission requests and browser notifications from malicious websites that attempt to exploit the memory bug. Administrators should ensure that all Chrome and Chromium-based browsers are upgraded to version 84 as soon as it is generally available.
For a longer-term solution, Google is examining alternatives to C/C++, including Rust, a programming language that is similar in syntax to C++, but has built-in memory safety features. Microsoft has already been replacing the C++ code in its Chromium-based Edge browser with Rust, having identified the limitations of C and C++.