From nobody Wed Aug 7 13:44:29 2024 X-Original-To: dev-commits-src-branches@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 4WfBHK4NFvz5S8rD; Wed, 07 Aug 2024 13:44:29 +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 4WfBHK2NkYz4j7P; Wed, 7 Aug 2024 13:44:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038269; 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=Xzh6jFuZZRZSLSQ9oX32EHeZNPMm+nWDIkaQfQl7L5s=; b=CLxTu7H0f5RrjwL1n59gbiQw6pkQUOTOApG9KJX/mN+MN3ajS6RKfmwy4cHGn8WDaaUff5 fHYFobCvQs9Rd0dznDhtW1oCGhAMBJQMHs5NBmRtQ2FwPU/Vuf8Eld85dybZ4PXByP7yrV h++1db07U0SesXUokR8JBACC8n/rWXCTIDGgmQSqNAAJgcjPl3y1ltqVCh6Rdk0/io063A RKHmv9I4tZgCulDNFdh8SImVpxSxTGK6mjH//Er5ITpbyT/lz8ygu8qOWPXAsDG+wognOm 798BAL77rtq9IMMATiKd4dwCPEXqZwdgUDnpJmz1TRK1WRp5Yg300f5LqRTZLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038269; a=rsa-sha256; cv=none; b=rgb0rl0n84ReR5Yhz9t0fWr5jJAgsL3oyciPbPs5Z7mw3y3zVNagU+3vs7PGvdP5chTrSo 4b324v43/kIGKM8CD0MlbCOhRK5cSGB2P/D43DNiNyilsnymraF7I2vFQ8m3rix+x8nCO4 vgaehzW16szqCX4DTPblxNIxwA0C43zJDfoBiUw6g9anky1rKXzEZPvMHMI/XDkpAFNt7U pRbjszlOvSNRyhq3l+VL1lA7iJiImarqiRguhZm8KrneHYC8zuttUWvEIXK9gfmVT90clZ +6XRnrcP7xv+PjIur/w6ERLaqr/QPBZTp5KslytiYMa3H4r9qhof3Y0C1rTvLA== 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=1723038269; 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=Xzh6jFuZZRZSLSQ9oX32EHeZNPMm+nWDIkaQfQl7L5s=; b=UB2aPmuTLf2O5bArgoKZBU8kfYg+XaPpazDEPE46E33ygKlI25N2OuhHfU8js+7dPM/RV2 VZ9CPW+vMF5tC3JmgSFfgL8CKg6tdBCTmP+kYqRdK+wLyCC/ypZ1EUSfTtrKhfVVtNesdE yQAbQ1ubwH13Cg8JdP2Vb9CS/r0yIoQkhFDKKi+pOeaaGixeXD8ruC4Kk5YUtPdbN3hSrX fwoFGIKnlaALHSnGWJdizA3XXoQm8Ft4yDJ7js6AgSRmUO31Occim08Hjn7DJvau7Erzmp oRgFGclGJcVWjXbAxPy9eaIrCyfp14IlvzhEgU6fm18Gtv3NvWBjCf25gql1gA== 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 4WfBHK1xbVzsjQ; Wed, 7 Aug 2024 13:44:29 +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 477DiTMf033720; Wed, 7 Aug 2024 13:44:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiT9U033717; Wed, 7 Aug 2024 13:44:29 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:29 GMT Message-Id: <202408071344.477DiT9U033717@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 22d04990cee5 - releng/14.1 - ktrace: Fix an inverted privilege check List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 22d04990cee5af5455490391ec386e8af3d368e5 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=22d04990cee5af5455490391ec386e8af3d368e5 commit 22d04990cee5af5455490391ec386e8af3d368e5 Author: Mark Johnston AuthorDate: 2024-08-07 13:38:54 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:43:27 +0000 ktrace: Fix an inverted privilege check Approved by: so Security: FreeBSD-SA-24:06.ktrace Security: CVE-2024-6760 Fixes: 1762f674ccb5 ("ktrace: pack all ktrace parameters into allocated structure ktr_io_params") (cherry picked from commit 166b7573b5220aadf8b02a85933c9651b909b309) (cherry picked from commit 8b400c8488f0b9e67ae269f6d8e5022a3bc7d854) --- 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 4c1936edc301..c7ba8896506d 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -593,7 +593,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);