From nobody Wed Aug 07 15:00:05 2024 X-Original-To: freebsd-announce@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 4WfCyZ1CNwz5SHD7 for ; Wed, 07 Aug 2024 15:00:06 +0000 (UTC) (envelope-from security-advisories@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "freefall.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfCyZ0C7gz43Gt; Wed, 7 Aug 2024 15:00:06 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723042806; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=x/2mtK09wPqXbNceDvWIm4xKOlZ97hxXXtZUL676sVo=; b=LDgfZ+pDzuO0UaeKfXIqeQAiINEOXJVpiN/inL3u5PykoyeUZvkjLaV0FdGzV708xpRNDL zrBzQXgeRou1CM6wijdDexBpkR7Vyxr1Y49i8OpUxjPQcbQmywRJiAY7hoSsL1TcJZ3u0r XkhHcgl0WexmEzxs9UdfdOpQ+pox8/AzM33epDbaX4yj8IRiIOerHvNbRNNQ+v+G1zijGP f+ku/qF69kp6INiMcxI0JdIL5bZMOQudUsUPDGNf2XPerIBdVvu8kqMOnkxl8nX1bDqy9r 7kRkM2lum+byRsrTX8OcyDAFJaZI4aODLiDAm5XJAyAi/A2AAmaPd8RPLrnqhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723042806; a=rsa-sha256; cv=none; b=dH8LBy5Tgxz4zzWP2UEUy6qtoPqzNr70woI2yNAybIxotMaSZqZBGx682NMGdvg0TwkflK 9/MFNG3zEm+SvHVr0TaBEznALH1FUXAdd0DHAKlcDO0NhbVr5AFp9rp7GYyrT1gxPwipI5 /iCXt9kpviMqPg0on25gyemJyHXe2JMyV4GdPZmSbsGWGDISoepEvpJ+FULzDNnq/qkK/F 96YVnahLYEuh+OxzWVBiDUbjSm/yFnOdVOPZ0pS9tVx63BbxIYfDQnOwIWr6DpSBRcgrKe 98tCBKXjJzfO8EBLqVxZ2ZDMGr8l8GQ63mVPZx15zmZn9lQPliokmIA9BE5wQg== 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=1723042806; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=x/2mtK09wPqXbNceDvWIm4xKOlZ97hxXXtZUL676sVo=; b=aP3meQaPEqaVMH2FYpAMz6K6KwnSHpzvduxbnv/hrY4zhd5LsQcfLv0U/ujdslbQIBMCJn N3YjZqpsirn3US+vxYug91c4JMtLo2e3rSpDfJNsANdhzk9O5CiOsk/0IApBI9j5KNNotk r9TsgJxVWdgTBfKtAzfGFV5X1bL9j5ZcY1KM2pVC9Z5kHgmGUqaOHWBeEPAz8ackqLOU+F 11cTp8GF+RQ40/h6FHr7MpURdU35bGudV8Z0IE9p1tV5+BEtVn1hXo0mL1cyQ5+nPNrljH KQbCt1VkWc3qUwFc+AVPtNtmSyk+M3nPWknt1NkCQ/J+ElZTITnmkqbepC/aUQ== Received: by freefall.freebsd.org (Postfix, from userid 945) id D39815D01; Wed, 07 Aug 2024 15:00:05 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-24:06.ktrace Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20240807150005.D39815D01@freefall.freebsd.org> Date: Wed, 07 Aug 2024 15:00:05 +0000 (UTC) List-Id: Project Announcements [moderated] List-Archive: https://lists.freebsd.org/archives/freebsd-announce List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-announce@freebsd.org Sender: owner-freebsd-announce@FreeBSD.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-24:06.ktrace Security Advisory The FreeBSD Project Topic: ktrace(2) fails to detach when executing a setuid binary Category: core Module: ktrace Announced: 2024-08-07 Affects: All supported versions of FreeBSD Corrected: 2024-08-07 13:41:53 UTC (stable/14, 14.1-STABLE) 2024-08-07 13:44:29 UTC (releng/14.1, 14.1-RELEASE-p3) 2024-08-07 13:44:47 UTC (releng/14.0, 14.0-RELEASE-p9) 2024-08-07 13:42:10 UTC (stable/13, 13.3-STABLE) 2024-08-07 13:44:59 UTC (releng/13.3, 13.3-RELEASE-p5) CVE Name: CVE-2024-6760 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background The ktrace utility enables kernel trace logging for the specified processes, commonly used for diagnostic or debugging purposes. The kernel operations that are traced include system calls, namei translations, signal processing, and I/O as well as data associated with these operations. II. Problem Description A logic bug in the code which disables kernel tracing for setuid programs meant that tracing was not disabled when it should have, allowing unprivileged users to trace and inspect the behavior of setuid programs. III. Impact The bug may be used by an unprivileged user to read the contents of files to which they would not otherwise have access, such as the local password database. IV. Workaround No workaround is available. I/O tracing can be disabled by setting the kern.ktrace.genio_size sysctl to 0, but other information recorded by ktrace, such as system call arguments, can still be leaked. V. Solution Upgrade your vulnerable system to a supported FreeBSD stable or release / security branch (releng) dated after the correction date. Perform one of the following: 1) To update your vulnerable system via a binary patch: Systems running a RELEASE version of FreeBSD on the amd64 or arm64 platforms, or the i386 platform on FreeBSD 13, can be updated via the freebsd-update(8) utility: # freebsd-update fetch # freebsd-update install # shutdown -r +10min "Rebooting for a security update" 2) To update your vulnerable system via a source code patch: The following patches have been verified to apply to the applicable FreeBSD release branches. a) Download the relevant patch from the location below, and verify the detached PGP signature using your PGP utility. # fetch https://security.FreeBSD.org/patches/SA-24:06/ktrace.patch # fetch https://security.FreeBSD.org/patches/SA-24:06/ktrace.patch.asc # gpg --verify ktrace.patch.asc b) Apply the patch. Execute the following commands as root: # cd /usr/src # patch < /path/to/patch c) Recompile your kernel as described in and reboot the system. VI. Correction details This issue is corrected as of the corresponding Git commit hash in the following stable and release branches: Branch/path Hash Revision - ------------------------------------------------------------------------- stable/14/ 8b400c8488f0 stable/14-n268423 releng/14.1/ 22d04990cee5 releng/14.1-n267693 releng/14.0/ c39fb98e4740 releng/14.0-n265429 stable/13/ f702110bc4bc stable/13-n258224 releng/13.3/ 769536bcb5c3 releng/13.3-n257445 - ------------------------------------------------------------------------- Run the following command to see which files were modified by a particular commit: # git show --stat Or visit the following URL, replacing NNNNNN with the hash: To determine the commit count in a working tree (for comparison against nNNNNNN in the table above), run: # git rev-list --count --first-parent HEAD VII. References The latest revision of this advisory is available at -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEthUnfoEIffdcgYM7bljekB8AGu8FAmazha0ACgkQbljekB8A Gu/6ThAAvKUJFwdRV/rSRyGEOTWJE+dv1Qig000xhD6g42yKpfGShaNFUTSvMPG+ kLtpN41SRN/LXyNyQfk3GL2SmphB2V9nlJ+FM2PEmi4hMrWoiNi6uX9MmSheFbp3 QbDAh5+2sRo66AUXjUX118cK1ruqQjRRMVSW6D8hOeDv64Wvg01L0R3ls1ZsdXYL 5wYuTRNh2ciyMEHQ0QUz8X38qebdPSV/8aVNSZYinwtYE+wGWbpmUCQoqgtLlnT9 3UqIy68KVj4+TNYoZuQkK5/Ur9YG884YlNpzsJ6peX8U0gjQhG1BfqEPAylTZn/6 vPp0LtJ0fRRZs0a6XJQ+rBxhuh22vLLFLXI9jSthCcNdJhRFFnnY9nFoB0/EOpIH I6i94dEExCeGkWcpPB2wyrQGPcRTik9h57vsTaHcnEAPWu1fO2OckUILZVsMs7Yp WXePdrVfTke1hIzk5DAc5PYJ1IKcN49m/+GhXjLz8aCcy9RadJPpJDe2HSltgfTn xvxAudY+58f6518getIfvU4tAA1DVw2Y9zRoRhdlXLiVDayBkCOFRMMBY1cWOk9o aUnbQ9PYO2h7iyzSvqgWDLIy7fIdLZnyuflSVtJ4KUnetk2hU5kxb0VZFx10+z7l dsTyXGdb04olDMvURtgn5eQotbJzn+KLqi3vOmQ92uAGSsLeH70= =3iOc -----END PGP SIGNATURE-----