From nobody Wed Aug 07 13:44:47 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 4WfBHg6Bf8z5S93N; Wed, 07 Aug 2024 13:44:47 +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 4WfBHg4kh2z4jcS; Wed, 7 Aug 2024 13:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038287; 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=oFmBx1+itiSfFrHkZ2tkzuIgIOOpj3D1rSKY07HiF9I=; b=kfAjlML7EoTZd6nTvL50UJJ1g5h9AxdUOlPqqvC8D1DUWH4eGUWOzCk7PwQzzUkjTJumUs /Z6tL6xGXLkdx8ipGS1Idfqk8dvXbM1ruIEaqdLr13PQFF7j/ib/il27llbmhQ6+GnUaQG 1sVl58EDsqmACzCUaKHhJfvBkVITqjD0kGfBZ0w1oB9PAtW/pDsyKdGNi0wWdt8gq1uPsF HpO9BMbh2bbozck8m7TBwtXyL38dPJZY0JnQLWjhTKuQta58iqcc8RT06AbBC4sR9hPgYN 0RSWtWFIwD4C6NuUPoPqve0EPNpGuGrlau/iY8bJwfcSaiDLHtG5m+Y/HA6Zyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038287; a=rsa-sha256; cv=none; b=n/HgVYamnPf3jdGYhcHQJucUZcehHuWszHPl6mph4/Oude6AL4wZzkc5+/ZYJTXfngroQE aAbvRjjC8PA8RPdiqEyq/sCWDCOlKoNBcjLLV6VI251H6V22gyu8jxvLfqyn5j1ZH3/Mbm wjQ2gxVrTEuTCy+ESgnZt2AwKAe2ogiXRH8EJpA36e+5izXpexSc4aziFgyjzUzpFh0+Dy C/IK6kK+h/RxMdwMbg5E7+T78ATQ41IeFOilgjdhB6r3DPj+REehksz1lwALghG1v26n84 Qq/WJ+1uPIc/iDXgt2MfOeinmB7WyFwVdVJtPINqIM8l+2l+Gi31XM35VeBedQ== 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=1723038287; 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=oFmBx1+itiSfFrHkZ2tkzuIgIOOpj3D1rSKY07HiF9I=; b=JdtXlgGhSfPQt3J2hMZHMjrhXw2buv58fVUei3FbDljNnVDity3N/Tn4Un1v/B6dzx+LUg ECzXom+h92xHyeDC3cBSJFijnvw0BRlQuqTpzacITqPknMm7ZOWglWPkBrPpMzW3Wsrpd5 uvTrJjbjKd2+pQcx1B4uiBSrrd5OqYu83H6oM83pXmFgBjM6DC4yf8qHvpsX3NO+DrRCUU ZOzTCRvjnQhgST7Ueeuupm5pv4XSQGRwUA5iawMK2u8nvfdZcWkK3jK9AHpYZ+fPczpOXV 3qpHWgJ8loUwhv2YxWFzKBBF4hpJ+eWierx4m9xYIY+gMJ+SDay2P9cAWSaeFQ== 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 4WfBHg4DXfzt3x; Wed, 7 Aug 2024 13:44:47 +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 477DilDx034379; Wed, 7 Aug 2024 13:44:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiloC034376; Wed, 7 Aug 2024 13:44:47 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:47 GMT Message-Id: <202408071344.477DiloC034376@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: c39fb98e4740 - releng/14.0 - 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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c39fb98e47400b0808a49628d0c57489e8a5a8ee Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c39fb98e47400b0808a49628d0c57489e8a5a8ee commit c39fb98e47400b0808a49628d0c57489e8a5a8ee Author: Mark Johnston AuthorDate: 2024-08-07 13:38:54 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:43:35 +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 01158c2c238f..196450af2c84 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);