Skip to content

Commit

Permalink
kernel: clear securebits (#2387)
Browse files Browse the repository at this point in the history
fix adb shell cannot escape to root after #2381
  • Loading branch information
5ec1cff authored Jan 28, 2025
1 parent 7a71da0 commit 62ef18b
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 @@ -151,6 +151,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 62ef18b

Please sign in to comment.