From nobody Wed Aug 07 13:44:59 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 4WfBHv5Dngz5S9MV; Wed, 07 Aug 2024 13:44:59 +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 4WfBHv3j6Lz4jtV; Wed, 7 Aug 2024 13:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038299; 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=eTlLAgViTIhXlqSuTBT8dANAVQ229Piddl/3g03oVec=; b=EoCBDPVTcaifNAqBhWjfBnODjM9E9bfWjrQGZm50HKWQpnc4EyYvBqtcqmZCdCnbc/bzHU QGh/zgdobUYb/gNmTgNLoBykqaZmCfugohnivusXcjWLllzmI50Q5s5OjzZ48sqDU2bUUh Yh5/rPgsGNBjWPK9N1wEk3DY8kXBwt9v3cue+Tc2Cct0n+RlfoHEIBGMBies1+GK9Ne0ov Wp3Vh17JQgtiahXSklEroeL/asGQ0MLxWZZ6fP2spzBMBcOM8ggpEbjnFWCRl2bf1JBerG 9/baqyz9po5Sds0T722kuMvegqZ9Zrauf4eQDrXnmbKSSFB5bzhJyD/wTB+weQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038299; a=rsa-sha256; cv=none; b=YMdHGCBp8QWT6zqidt+amEgOomaqgjogzk4qb78UyQyIG91ErIeTG3iWeJIVuXYEPX/sEz PKBdF7Jj8cC7u32+M33ny5NWBLHFPuKm9K1zx59XEee7g2HGefWQ6k9Mfm0/NcYqgE/nU/ 8e8HPoewL+CKbijIC7P3JKdlp/lKei5dSYZR9HQlBGfL4hwGeM3kcKGYXjz0ou3CbS7r8l CmTIPqgwAXvlL7a/XLpE7eFaF9XDYzaHkGy7RfNI0Wb6Tl/KJM4BTFsmmrgN0KHZGyxKjz XDt8RKkafYGRrS2IV/Ez05uhoRKkD6+bGuK/7coWxYTxeH834I36kHO1nAE4/Q== 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=1723038299; 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=eTlLAgViTIhXlqSuTBT8dANAVQ229Piddl/3g03oVec=; b=U0MfXqufRiqqhoNOi+udjQNiLElVoHlbB3SIhHYQ0p4/mcgEHa4pet0eP3QCCRC7QQnAgr FFHkeYIbf+0wydkC1bvDKmE2X9ui7FRTk2+6JVBduQHH/7nb+MAZE/QvCa17ei/YeVusdZ vqt28AFWAmXYEvRlQkkegP1zaOS2pouI8AYWZYfolYuD+kTelGqaqPV1viULfYfnIMJg/Q uGN8lUpfkmhfq/SMjzB4fkvYXPyZOw4qiLMJvZTrjUtRFI19pmuNgJVdDel8uEEeT/5B3I qFUN4hSWeV77ut1tGjYEdU/Q5rUPGlATSeUadrhkYmSQAlUjjAzlFHy37QDLYQ== 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 4WfBHv3JVLzsgh; Wed, 7 Aug 2024 13:44:59 +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 477Dixah034967; Wed, 7 Aug 2024 13:44:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Dixbd034964; Wed, 7 Aug 2024 13:44:59 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:59 GMT Message-Id: <202408071344.477Dixbd034964@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: 769536bcb5c3 - releng/13.3 - 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/13.3 X-Git-Reftype: branch X-Git-Commit: 769536bcb5c334ca551b4dc88cf7486bd960e192 Auto-Submitted: auto-generated The branch releng/13.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=769536bcb5c334ca551b4dc88cf7486bd960e192 commit 769536bcb5c334ca551b4dc88cf7486bd960e192 Author: Mark Johnston AuthorDate: 2024-08-07 13:38:54 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:43:45 +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 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);