mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
o Modify access control checks in p_candebug() such that the policy is as
follows: the effective uid of p1 (subject) must equal the real, saved, and effective uids of p2 (object), p2 must not have undergone a credential downgrade. A subject with appropriate privilege may override these protections. In the future, we will extend these checks to require that p1 effective group membership must be a superset of p2 effective group membership. Obtained from: TrustedBSD Project
This commit is contained in:
parent
d22e5c3d89
commit
6bd1912df4
1 changed files with 3 additions and 3 deletions
|
|
@ -1178,9 +1178,9 @@ p_candebug(struct proc *p1, struct proc *p2, int *privused)
|
|||
|
||||
/* not owned by you, has done setuid (unless you're root) */
|
||||
/* add a CAP_SYS_PTRACE here? */
|
||||
if (p1->p_cred->pc_ucred->cr_uid != p2->p_cred->p_ruid ||
|
||||
p1->p_cred->p_ruid != p2->p_cred->p_ruid ||
|
||||
p1->p_cred->p_svuid != p2->p_cred->p_ruid ||
|
||||
if (p1->p_cred->pc_ucred->cr_uid != p2->p_cred->pc_ucred->cr_uid ||
|
||||
p1->p_cred->pc_ucred->cr_uid != p2->p_cred->p_svuid ||
|
||||
p1->p_cred->pc_ucred->cr_uid != p2->p_cred->p_ruid ||
|
||||
p2->p_flag & P_SUGID) {
|
||||
if ((error = suser_xxx(0, p1, PRISON_ROOT)))
|
||||
return (error);
|
||||
|
|
|
|||
Loading…
Reference in a new issue