exec: Add node tampering blacklist function
We'll be adding checks to block writes from processes which tamper with values that we control from within the kernel, especially ones that userspace writes to for boosting. Add a central function to perform the process check to reduce code duplication. This blacklists the following processes which are known to tamper with such values: - init - libperfmgr (power@1.3-servi and NodeLooperThrea) - perfd (perf@1.0-servic) - init.qcom.post_boot.sh (init.qcom.post_) Signed-off-by: Danny Lin <danny@kdrag0n.dev> Signed-off-by: Julian Liu <wlootlxt123@gmail.com> Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com> Signed-off-by: rezaadi0105 <rezaadipangestu5@gmail.com>
This commit is contained in:
parent
1aaa0360e8
commit
00c4a222bb
1 changed files with 10 additions and 0 deletions
|
@ -142,4 +142,14 @@ extern ssize_t read_code(struct file *, unsigned long, loff_t, size_t);
|
|||
int kernel_execve(const char *filename,
|
||||
const char *const *argv, const char *const *envp);
|
||||
|
||||
static inline bool task_is_booster(struct task_struct *tsk)
|
||||
{
|
||||
char comm[sizeof(tsk->comm)];
|
||||
get_task_comm(comm, tsk);
|
||||
return !strcmp(comm, "init") || !strcmp(comm, "NodeLooperThrea") ||
|
||||
!strcmp(comm, "power@1.3-servi") ||
|
||||
!strcmp(comm, "perf@1.0-servic") ||
|
||||
!strcmp(comm, "init.qcom.post_");
|
||||
}
|
||||
|
||||
#endif /* _LINUX_BINFMTS_H */
|
||||
|
|
Loading…
Reference in a new issue