kernel: clear securebits (#2387)

fix adb shell cannot escape to root after #2381
This commit is contained in:
5ec1cff
2025-01-28 19:02:14 +08:00
committed by GitHub
parent 7a71da057e
commit 62ef18b560

View File

@@ -151,6 +151,7 @@ void escape_to_root(void)
cred->fsgid.val = profile->gid; cred->fsgid.val = profile->gid;
cred->sgid.val = profile->gid; cred->sgid.val = profile->gid;
cred->egid.val = profile->gid; cred->egid.val = profile->gid;
cred->securebits = 0;
BUILD_BUG_ON(sizeof(profile->capabilities.effective) != BUILD_BUG_ON(sizeof(profile->capabilities.effective) !=
sizeof(kernel_cap_t)); sizeof(kernel_cap_t));