From nobody Wed Aug 07 15:43:51 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 4WfDx40Jp3z5SVHP; Wed, 07 Aug 2024 15:43:52 +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 4WfDx36g9sz4rBY; Wed, 7 Aug 2024 15:43:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723045431; 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=rfGoycXEElD9wT94lZtFgQlY5i+frQhwMx2TvJpq4hQ=; b=VsW4+YiQRdi4uudaOhJOxBQtk2PIPIpghLtf0e3k+oHdPfyt0CzvHA5MqHwyZ50lrVlOc7 RIfLjU7XDJLVuMskg++Yt4vVXmJ1zmYemcH1v0ySgm4SG13aq45Bo11iKeSFSGsMcjfnB3 7sGGEfL9PP1NHAJl2e5WgGgSVwCuDAC+Z2LN3OlOi7MHcymxs9iiAJxuOlyR9uBO7fVKsK ONPrhwObWgbdfFkC3JzToHijysshpFRkJ3cU6Zj/ub84qmlYq4jS4I1PrgtFoizORVDmvT yW4w3+I/B+KUFmdP8QtSVTzee0ki9PMjJay+UerL6QTfU4Ata/6AWiXQ2aCz6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723045431; a=rsa-sha256; cv=none; b=JULueL+AC0E0JdzN8qCGoPg1XSzOFRI5nhFiKZX5T4yAJhkxwjw4QAxFeXOc4YAtiuBCsQ 1DtAVz7jf+BQI5sASVgFOpCjGjRqoPLZMZK4zcT8MORBMo2PU+rywI2/MuKjUwYJZ2IWvd bT1Tx3oa1g0UcUel6kehxymLufTPjqCZI/ScT0eqBxpAZ0i2XxpWzIx+1hVx9Y5eUwJbBv eZrbSMpzbqM7FmK+tp6f3I9PFfFlT805pxM8O+SYAgQ6WrzEjfysxjNajdGoefOGq5aQwZ k7GY00iExr621Cex+Bxw2WXHDbVp7IDIkfd0VHM2NE5VDAKaEjGJMr1S2mm6bg== 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=1723045431; 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=rfGoycXEElD9wT94lZtFgQlY5i+frQhwMx2TvJpq4hQ=; b=gpQKxxAE3UUVbvDz/S0gXyN1rnY3CUOA23wOZRAzWISYrMtPHebOj9OofQahMyeHIP63WT wLZ2VCLaEGPWk6wb6JYzpyDSCHR41hi5gxFKg0eQyz1hSMTSRHUhfCJLx71DAiosN0uMZ/ iUuzK/ZYn6QmAggoEWeYHo63Lyc/TjSRuCf0NbLMeidNphiW2dz44n7ouIkaTYiLQCqjj+ cT/nE2xo3oSD/afQN4gABhVeZdZOcAV6y+9dseAoneb79AW40agRefEa5UqetOvKX2UH9k k3IPEiNr49LjN47yCPzg3QANoSF3kWc6pgvH0WFtIUPraYbwcP2cP1bdhgDL/Q== 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 4WfDx36GcRzwxQ; Wed, 7 Aug 2024 15:43:51 +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 477FhpL6039508; Wed, 7 Aug 2024 15:43:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Fhpsw039505; Wed, 7 Aug 2024 15:43:51 GMT (envelope-from git) Date: Wed, 7 Aug 2024 15:43:51 GMT Message-Id: <202408071543.477Fhpsw039505@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: a87a5973132b - releng/13.4 - 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/13.4 X-Git-Reftype: branch X-Git-Commit: a87a5973132ba396c870068083395761e794ce47 Auto-Submitted: auto-generated The branch releng/13.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a87a5973132ba396c870068083395761e794ce47 commit a87a5973132ba396c870068083395761e794ce47 Author: Mark Johnston AuthorDate: 2024-08-07 13:38:54 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 15:43:39 +0000 ktrace: Fix an inverted privilege check Approved by: so Approved by: re (cperciva) 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 f702110bc4bcc593b38674ec6e4fadf6c4626432) --- 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 2729d0880b31..cc51dbae46f7 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -585,7 +585,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);