Skip to content

Commit

Permalink
kernel: clear securebits
Browse files Browse the repository at this point in the history
fix adb shell cannot escape to root after tiann/KernelSU#2381
  • Loading branch information
5ec1cff authored and rifsxd committed Jan 27, 2025
1 parent 2a4f566 commit 6f7acb1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/core_hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ void escape_to_root(void)
cred->fsgid.val = profile->gid;
cred->sgid.val = profile->gid;
cred->egid.val = profile->gid;
cred->securebits = 0;

BUILD_BUG_ON(sizeof(profile->capabilities.effective) !=
sizeof(kernel_cap_t));
Expand Down

0 comments on commit 6f7acb1

Please sign in to comment.