⬢ DragonFlyBSD Kernel Audit
DF-3259 / fix.diff
← back to finding ↓ download raw
--- a/sys/vfs/procfs/procfs_rlimit.c
+++ b/sys/vfs/procfs/procfs_rlimit.c
@@ -63,6 +63,10 @@ procfs_dorlimit(struct proc *curp, struct lwp *lp, struct pfsnode *pfs,
 	char psbuf[512];		/* XXX - conservative */
 
+	if (!CHECKIO(curp, p) || p_trespass(curp->p_ucred, p->p_ucred))
+		return (EPERM);
+
 	if (uio->uio_rw != UIO_READ)
 		return (EOPNOTSUPP);