From 1a3e21dec3d08a5326aa5f4f39a8f9cff54d24f6 Mon Sep 17 00:00:00 2001 From: Andrey Artemiev Date: Fri, 5 Aug 2022 00:32:20 -0700 Subject: executor: fixed fuzzing with System account in Android sandbox (#3275) --- executor/common_linux.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'executor/common_linux.h') diff --git a/executor/common_linux.h b/executor/common_linux.h index 6e9f6a7d4..24f553848 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -4228,7 +4228,8 @@ static int do_sandbox_android(int sandbox_arg) prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); setfilecon(".", SELINUX_LABEL_APP_DATA_FILE); - setcon(SELINUX_CONTEXT_UNTRUSTED_APP); + if (uid == UNTRUSTED_APP_UID) + setcon(SELINUX_CONTEXT_UNTRUSTED_APP); loop(); doexit(1); -- cgit mrf-deployment