Skip to content

Commit

Permalink
HACK: fs/proc: block access to mounts for "IsolatedService"
Browse files Browse the repository at this point in the history
Prevents Magisk mount leakage and root detection by apps with unmodified detection code from here:
https://darvincitech.wordpress.com/2019/11/04/detecting-magisk-hide/

Example: https://play.google.com/store/apps/details?id=ua.gov.diia.app
  • Loading branch information
acroreiser committed Apr 25, 2020
1 parent 38f94ef commit d17c01f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fs/proc_namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ static int mounts_open_common(struct inode *inode, struct file *file,
if (!task)
goto err;

if(!strncmp("IsolatedService", task->comm, 15))
{
ret = -EINVAL;
goto err;
}

rcu_read_lock();
nsp = task_nsproxy(task);
if (!nsp) {
Expand Down

0 comments on commit d17c01f

Please sign in to comment.