mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 20:12:44 +00:00
ktrace: Fix an inverted privilege check
Approved by: so
Security: FreeBSD-24:06.ktrace
Security: CVE-2024-6760
Fixes: 1762f674cc
("ktrace: pack all ktrace parameters into allocated structure ktr_io_params")
This commit is contained in:
parent
0c00dbfeb0
commit
166b7573b5
@ -591,7 +591,7 @@ ktrprocexec(struct proc *p)
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
|
||||
kiop = p->p_ktrioparms;
|
||||
if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED))
|
||||
if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED) == 0)
|
||||
return (NULL);
|
||||
|
||||
mtx_lock(&ktrace_mtx);
|
||||
|
Loading…
Reference in New Issue
Block a user