Skip to content

Commit

Permalink
kernel: Add mitigation to avoid placing manager in lib to bypass check
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Dec 8, 2023
1 parent 064de70 commit c560d60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ bool become_manager(char *pkg)
}
cwd = d_path(&files_path, buf, PATH_MAX);
if (startswith(cwd, "/data/app/") != 0 ||
endswith(cwd, "/base.apk") != 0) {
endswith(cwd, "==/base.apk") != 0) {
// AOSP generate ramdom base64 with 16bit, without NO_PADDING, so it must have two "="
continue;
}
// we have found the apk!
Expand Down

0 comments on commit c560d60

Please sign in to comment.