From nobody Wed Aug 07 13:41:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WfBCn2m3rz5S96d; Wed, 07 Aug 2024 13:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBCn2Bckz4h0P; Wed, 7 Aug 2024 13:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OLcZdkdLHM4ZITxwhiE/9OEW+oFcaguqg1T5MB2Tv/w=; b=v3wCYktqU32EpvlEdcLbzfQcNrBkd0aKygRttf6qc55yOq0LtiQITSlftuSvzU8qFJuB+7 yunyB3FDRmJXrKZUubCZcruEzCrt0m46vh3K80/IHnBExOqNIpSF065q02y4mj3iBln+I+ B5i3023I4K5vRZ9v1ZlQKcJK8/z9d5GY3kifU8JSFve50HvVs5ZI710Z49rRgk+Qok6cdM BPaYZQ/FIc0TBnfDcaSegYLABmALxpVwatM/P0+5cgHzlI3c1aztSPUZOgJ6XuEp9IWNcc YBNkCDnfA9ldfgWKBneOEdPxB0qkj2QPqDHN+S7tNDsflU8O7jMn1NS8/unnKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038085; a=rsa-sha256; cv=none; b=x1ja7Nr/qb/8/vkwWvq3v4TufuP/UTdaAc6kIOHPGSW3Lz8KZsj2nPVT/4WziMvEA3D7kS ujp2lTe9Xdq8EbdK8DTO++6yZlKXihGzKa0ubMT75hkLzT+wSppawM3NOzlokBWhhE9y5U qeAHYkk8NxnIF6Z7NAxevTaqQOLPw2VgHvlov9g+q91wVxnQW2WqX+GcFw6SfPLfxLfElm xDx7b6by9uoHQF6WYOHYfaBKqPnCQcVaO0BxA763bUIBAG8l6deYOawM1/X7hxlP9rl/g+ zBIWfmi7ObEsfT+ITeEH9qiHzUCJlry3W6nY+9gmGLIsYOLOLkiYyC46rtNjEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OLcZdkdLHM4ZITxwhiE/9OEW+oFcaguqg1T5MB2Tv/w=; b=hzBu9lrsta6FcmOKlmGosFNVdvArLcULrIuov0PARnU27Pm7xaIrm37q2QZ5U/wFN1t/Ec GfGiacsgTP9+Px2wM2JDit8eZZS5SuDKDImRqzQ9YbVtqpoKb+5j1XxzWwMd1LOks+03fS pBiy1cMQ36DYAGd5mOE4+QwgYPBPSvtHptpVvulhieqmcX1+pNO88IHmryIbV+9gAMEUxs lJFmL7dKmARh0dwgoqk8A+Y8wYt79YQgdWLIzb+JRmhrmltYAFVsvRBDO0MFnzcoCujQoB egE76QjJGG4eYxlTlyay13PFjERbv0cUFlMIFXl53AP8r9lfKN/LAER046mCmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WfBCn1ppSzsr7; Wed, 7 Aug 2024 13:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 477DfPpR030527; Wed, 7 Aug 2024 13:41:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DfPU0030524; Wed, 7 Aug 2024 13:41:25 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:41:25 GMT Message-Id: <202408071341.477DfPU0030524@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 166b7573b522 - main - ktrace: Fix an inverted privilege check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 166b7573b5220aadf8b02a85933c9651b909b309 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=166b7573b5220aadf8b02a85933c9651b909b309 commit 166b7573b5220aadf8b02a85933c9651b909b309 Author: Mark Johnston AuthorDate: 2024-08-07 13:38:54 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:41:17 +0000 ktrace: Fix an inverted privilege check Approved by: so Security: FreeBSD-24:06.ktrace Security: CVE-2024-6760 Fixes: 1762f674ccb5 ("ktrace: pack all ktrace parameters into allocated structure ktr_io_params") --- sys/kern/kern_ktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 142aa790a908..868885898d0c 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -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);