From nobody Wed Aug 07 13:41:53 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 4WfBDL1nNqz5S96p; Wed, 07 Aug 2024 13:41:54 +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 4WfBDK6795z4hFm; Wed, 7 Aug 2024 13:41:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038113; 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=k4WjGmOUNi9V5d3kXa5B5ZHvHlrNFDwTRtfIM+LqV7Q=; b=WUrMEhwgcPnovwMJZaDUOQeqq/5ractKjuhIBFQcajGP6tvaamip5CTlY8r9y8afJR9+cj E1aBZuuENYlv9zuqD3UV2FlvVpS56roWUCTv+gk4RPtQ1jLoMoovcQ5ib1+rZNRESSdZoP +0pZYeZBDNrsst5MgrqE1zcF0tfSjaQ3TgdxwnaSjFX2acObssQDeWTZoxVXHiGRNbpORc nSFqwlN7YyKBMUOxh6ZzMlRh8WuwwVEuafo6ahMlp932VfIIJy2uWSVRZk+btI2ma5vvnr 27fE285D8i4VVd9UMF3OQK/HrAqsth0RF86AjhE/EbFX3w5ZPIqq3IJpw4ThsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038113; a=rsa-sha256; cv=none; b=yuBvuo/7U4Gu5VvqaiOqtlZ2fLozlgRxflQdt+ZRtdmj4vI9OSU8btvd8LtxSqqTDK3bUR rBBFKGIcFSc2dOaOdoOdJkIVr7N8XTnUi1iuA/kmdDV7EO7clK8/lL94xSLZCr/fZFMTIV rAZ2uglvrjc1oyRKNlsubattAY6Pb7LqT0m1WP03SdsfADCe4pOkxfFvYF73ppZWVzzrps lQ/ELhNazq5aKTeUIpBmcT7pbFQozWOujmwbW6EZhZ6C5K25/TOL8puqyXXfpsPfS5HGWv EwRFKNmhvzU7lV3vV0/XX4OX7GTGtlW7wI4j2ClzkOLk0qQtSOD42TNYksZYSQ== 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=1723038113; 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=k4WjGmOUNi9V5d3kXa5B5ZHvHlrNFDwTRtfIM+LqV7Q=; b=KFfOwTjUZR87L3zAxwKPPQ5m/jLfK5COVuktSPVK7gl8F5AQMt9evyYcxHyyRX2XnxLg5h UpwHbdoyWufgG9yn90IGJON9W1zf9TaC6JRz5OGIB6QndhYG9CvCG1QSVdfXv3OhS9+xkm eFu+CjkRTcWOp4SmVyxqqwMs2O0ATzMblHRIYMT7kPvfpNOTec8A5AfZX0h1UCJA4QtUnf vFMqk1rfn7rzEXHidVt5RF62hr6OpVfY9IhJzdQNmZU++OcCBBC5BYFiJnQMrxNqp+rRKx m8gm1xrsG8OSpzt9S4GYA6JnKExPEF/8o45AVI7FKBpNyAdl1A5YJhtpF/PGcw== 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 4WfBDK5kkrzsdR; Wed, 7 Aug 2024 13:41:53 +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 477Dfr6Z030727; Wed, 7 Aug 2024 13:41:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Dfrgi030724; Wed, 7 Aug 2024 13:41:53 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:41:53 GMT Message-Id: <202408071341.477Dfrgi030724@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: 8b400c8488f0 - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 8b400c8488f0b9e67ae269f6d8e5022a3bc7d854 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8b400c8488f0b9e67ae269f6d8e5022a3bc7d854 commit 8b400c8488f0b9e67ae269f6d8e5022a3bc7d854 Author: Mark Johnston AuthorDate: 2024-08-07 13:38:54 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:41:42 +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") (cherry picked from commit 166b7573b5220aadf8b02a85933c9651b909b309) --- 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 555762185411..1c6a2ae01f3d 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);