Multiple Samsung Specific Modifications to Android Leading to Permission Bypasses
Original Post:
We discussed this vulnerability during Episode 167 on 14 November 2022
Oversecured pointed their code-scanning tool at discovering issues in vendor patches to the Android System APIs and found a number of places where Samsung introduces vulnerabilities.
- The
BackupManagerService
’sisBackupEnabled()
method in stock Android would perform aandroid.permission.BACKUP
check before returning. Samsung simply added asemIsBackupEnabled()
method which does the same but skips the permission check. - The
StorageManagerService
added support for a broadcast action (com.samsung.intent.action.RESTART_OF_SDCARDBADREMOVED_HASAPK
) that could be sent by any application and would reboot the device without any permission check. - Inside of Settings application as it handles intends, an application can include a boolean
from_search_trampoline
. Which would then startup the specified activity. As the Settings application runs asSystem
user, they can startup non-exposed activities from any application.