Clang Code Sanitizer: Google fixes Cellular Vulnerabilities in Android

Brother

Professional
Messages
2,590
Reaction score
481
Points
83
Improving security in Android will lead to drastic changes in the codebase.

Google is strengthening the protection of the Android operating system, focusing on cellular security and vulnerability prevention. For this purpose, Clang code analysis tools are used, in particular, Integer Overflow sanitizers (IntSan) and BoundsSanitizer (BoundSan), which are part of UndefinedBehaviorSanitizer (UBSan). The tools are designed to detect various types of undefined behavior during program execution.

In a blog post, Google said that these tools are architecture-independent, suitable for the underlying software, and should be activated in existing C/C++ codebases to address unknown vulnerabilities.

The development is an important part of Google's strategy, which began several months ago when the company began working with partners in the ecosystem to improve the security of firmware that interacts with Android. This makes it difficult for attackers to execute code remotely in a Wi-Fi SoC or in the cellular baseband signal processing module.

IntSan and BoundSan are compiler-based sanitizers implemented by Google as an exploit protection measure. They detect arithmetic overflows and perform bounds checks when accessing arrays.

Despite significant performance degradation due to the use of BoundSan and IntSan, Google included them in security-critical attack surfaces before fully deploying them to the entire codebase.

Components to enhance security include:
  • Features for analyzing messages delivered wirelessly in 2G, 3G, 4G, and 5G networks;
  • Libraries that encode / decode complex formats (for example, ASN.1, XML, DNS, etc.);
  • IMS, TCP, and IP stacks;
  • Messaging functions (SMS, MMS).

Separately, the researchers 'position on 2G is worth noting: the best strategy is to disable this standard completely, using the "2G toggle" function in Android. However, in some regions of the world, 2G is still a necessary mobile access technology.

It is worth noting that despite the benefits of implementing sanitizers, they do not solve other classes of memory security vulnerabilities. Therefore, Android plans to switch the codebase to a memory-safe Rust language. In early October 2023, Google announced that it had rewritten the firmware of the protected VM (pVM) in the Android Virtualization Framework ( AVF) on Rust, providing a secure foundation for pVM.

The researchers emphasize that as the high-level operating system becomes a more complex target for attacks, low-level components, such as the Baseband module, will attract more attention. Using modern tools and technologies to protect against exploits, you can raise the bar for attacks on Baseband.
 
Top