kernel: clear securebits

fix adb shell cannot escape to root after https://github.com/tiann/KernelSU/pull/2381
This commit is contained in:
5ec1cff
2025-01-26 23:44:06 +08:00
committed by rifsxd
parent 25b57204ef
commit 87fc6b2784

View File

@@ -169,6 +169,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));