android_mitigations.md

August 31, 2021 ยท View on GitHub

We list mitigations added in all Android versions.

Version (and date)MitigationReferences
2.3Binaries compiled with non-executable stack and heap26
2.3Stack ramdomized?
4.0Libraries randomized?
4.0.2Heap randomized?
unknownExecutables randomized24
4.1default umask 0077?
4.1Linker randomised?
4.1isolatedProcess introduction?
4.1.1mmap_min_addr increased to 32768?
4.1.1/proc/kallsyms not available. kptr_restrict to control it.9 10 11
4.3SELinux in permissive mode?
4.3deletion of setuid/setgid binaries?
4.3deletion of Linux capabilities in dans zygote/adbd?
4.4SELinux in enforcing mode to crucial domains?
5.0SELinux in enforcing mode to all domains12
6.x?isolatedApplicationData13
6.x?preventAppDataExecution1
NUndefinedBehaviorSanitizer (UBSan) allowing Integer Overflow Sanitization (IntSan) in media stack2 3
Nmediaserver containment / some media services are in their individual service processes (sandboxed)4 5
?trustzone6
OPrivileged Access Never (PAN) emulation7 8
OHardened usercopy (w/o whitelist)7 8
OPost-init read-only memory (__ro_after_init)7 8
OKernel Address Space Layout Randomization (KASLR)8
Omedia service processes converted into HALs5 15
OSECURE_DELETE on SQLite databases16
OControl Flow Integrity (CFI) in select components3
PControl Flow Integrity (CFI) in more components by default (media framework, NFC, Bluetooth)3 17 5
PKernel Control Flow Integrity (kCFI) into Android common kernel3 14
PInteger Overflow Sanitization (IntSan) in more libraries (libui, libnl, libmediaplayerservice, libexif, libdrmclearkeyplugin, libreverbwrapper) and reduced performance overhead by 75%3
10software media codecs moved into constrained sandbox in system service (mediaswcodec sandbox, based on SELinux and seccomp, no access to device drivers)5
10LLVM's bound sanitizer (BoundSan) to fail safely when array's overflow, at compile time, enabled on 11 media codecs and Bluetooth's stack5
10Integer Overflow Sanitization (IntSan) to fail safely when integer overflow, at compile time in all media framework5
10LLVM's Shadow Call Stack (SCS) to protect return addresses (x18 register) in Bluetooth stack and some parts of the kernel5
10eXecute-Only Memory (XOM) makes code unreadable for Aarch64, ARMv8.2+ and Linux 4.9+ devices5
10Scudo Hardened Allocator (resilience against UAF, double-frees, BOF, heap sprays) enabled in media extractors and codecs5
unknownStack Protector Strong18
unknownRELRO/NOW19 22 23
unknown-Wl,--fatal-warnings and -Wl,--warn-shared-textrel20
unknown-D_FORTIFY_SOURCE21
unknown-Werror=format-security25
11DebugFS not present in kernel config27 28