Fix jump label collusion

This commit is contained in:
Wang Han
2025-08-05 01:08:06 +08:00
committed by GitHub
parent c3e9322ac6
commit 031f41e6be

View File

@@ -595,7 +595,7 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old)
#ifdef CONFIG_KSU_DEBUG #ifdef CONFIG_KSU_DEBUG
pr_info("handle umount for unsupported application uid: %d\n", new_uid.val); pr_info("handle umount for unsupported application uid: %d\n", new_uid.val);
#endif #endif
goto umount; goto do_umount;
} }
if (ksu_is_allow_uid(new_uid.val)) { if (ksu_is_allow_uid(new_uid.val)) {
@@ -613,7 +613,7 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old)
#endif #endif
} }
umount: do_umount:
// check old process's selinux context, if it is not zygote, ignore it! // check old process's selinux context, if it is not zygote, ignore it!
// because some su apps may setuid to untrusted_app but they are in global mount namespace // because some su apps may setuid to untrusted_app but they are in global mount namespace
// when we umount for such process, that is a disaster! // when we umount for such process, that is a disaster!