From nobody Wed Jan 29 21:33:19 2025 X-Original-To: freebsd-security-notifications@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 4YjwPX4wJ6z5m3Sm for ; Wed, 29 Jan 2025 21:33:20 +0000 (UTC) (envelope-from security-advisories@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 4YjwPW59dWz3wdS; Wed, 29 Jan 2025 21:33:19 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738186399; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=M0jn+qA0JUOJvgAJj0BPy1SU7alJqC+NIlGtN6PB8Yo=; b=ZGuoPK93BrE4b/lpSmMAkMBxPC2Vr0adpWXDXpl776U4Lthh10/YpVIy+c9luEhkHKE22K DisSAe6PwMyMLnphPsmXlzbo2kRFUnfNfH00lLxzj9bYnLdMOolKut8dhpXSMWSsK5MmBw ntN9tmDQjdOrsXN9wrIGq3gRCkJ/LVtxXJ+N4iloiAW0uY4O4vkcB/R+jhep7cYpOZZm9P fvS1FlOSqkXsQehkKrBcdU4q5sAUWdJzQH9J5hNN6aZZOQddNyJLvTszNSKvpd4pYfCT3c 6P+54IDhln462usW+rzC23i2zJ2XnJfbZn2Vu0o0UXRAQYSeVLmx8jq/5ytfsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738186399; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=M0jn+qA0JUOJvgAJj0BPy1SU7alJqC+NIlGtN6PB8Yo=; b=JCGKmyDtWruIHqw+2eJXrfo32dbuW5Wbuq4Kf2v62H4hB44dobr4EXIxs2kNpwDAEEoQb9 dqTryG+KgpwUMyG+80CChPIV22bGzVanX+V9cfKpfCUG/5qi1ODfFW8mULKVZg02yy1nHW Y/pcYzDgKwvIbvXbpIQMEMwhg4fAoN49YNodJskBUm1+IsMPhQjjpiD8B8WnAi4IjYr63P 2rJd8C05M1kKcbnGDE4VUJ3knc6Z745qPmArsZDRHyuah22CUEgfd8UZebxHI2NC36u4SO HJxWy72w5ndNPwn8IaTi+VXAqsXLrapuvJ5B+5DIEEkQwTA6kAosNDcYL3ofLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738186399; a=rsa-sha256; cv=none; b=fdau4zUJ6++i5fGTaEu+U/CH79KXDY6AuqYiFwkNLrnXCebJaFuiORDnMtA1cnphNfkMo1 QLOqnfTZkKz8IALG90dOI8VOqvJ0d1+n6pU8JC4bxiLlDpVDkE3fm03OT2HPBlnKVwKuHa DM2GwZ8CjlhHXyqtF+Ft7KcQqZ/5JwLosdCst9KjhpbkLylpX8Jeky8Q/2IbNxv86KJ0RN cPKg50iMCtlEtBNT5gjT7wFaLOlHtu8o+OftHpYUaXk5/NkPVOYbGcYKr7sLkmIaTEsr3q JqhfTAViv64+mAdcSsxoxzx5dq4tne0WT3n1/UcpA9f9+zo7W9rczi+HpZ4fLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: by freefall.freebsd.org (Postfix, from userid 945) id AA96C27C8; Wed, 29 Jan 2025 21:33:19 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-25:04.ktrace Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20250129213319.AA96C27C8@freefall.freebsd.org> Date: Wed, 29 Jan 2025 21:33:19 +0000 (UTC) List-Id: Moderated Security Notifications [moderated, low volume] List-Archive: https://lists.freebsd.org/archives/freebsd-security-notifications List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-security-notifications@freebsd.org Sender: owner-freebsd-security-notifications@FreeBSD.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-25:04.ktrace Security Advisory The FreeBSD Project Topic: Uninitialized kernel memory disclosure via ktrace(2) Category: core Module: ktrace Announced: 2025-01-29 Credits: Yichen Chai and Zhuo Ying Jiang Li Affects: FreeBSD 14.2 Corrected: 2025-01-20 22:09:53 UTC (stable/14, 14.2-STABLE) 2025-01-29 18:54:50 UTC (releng/14.2, 14.2-RELEASE-p1) CVE Name: CVE-2025-0662 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 In some cases, the ktrace facility will log the contents of kernel structures to userspace. In one such case, ktrace dumps a variable-sized sockaddr to userspace. There, the full sockaddr is copied, even when it is shorter than the full size. This can result in up to 14 uninitialized bytes of kernel memory being copied out to userspace. III. Impact It is possible for an unprivileged userspace program to leak 14 bytes of a kernel heap allocation to userspace. IV. Workaround No workaround is available. 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-25:04/ktrace.patch # fetch https://security.FreeBSD.org/patches/SA-25:04/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/ 99d5ee8738a3 stable/14-n270190 releng/14.2/ 10f8a9df522f releng/14.2-n269507 - ------------------------------------------------------------------------- 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----- iQIzBAEBCgAdFiEEthUnfoEIffdcgYM7bljekB8AGu8FAmeajK4ACgkQbljekB8A Gu84pQ//WXxC3kW+JP6R73oQ3s5hhokCE7FjwlRj6QhkblmgBdRrwwFzkR0nLfSK TUirfyYikaCtw3K/FpAYfm4VSJR3MlFhjUXhU+4KWBnJHf0t6NYEJP6MixsDFMvn IZWZsrLs8Ryl03kKiH3EWfA9KVqx0OI0Cj9LOLo5nBzZjR0auUxYRdNrYuEq4i9n OxMRbB3i5C3oy+I8ZW6fAAyYRb008oLDZmMBluIybCH01B35NQP/iAjpO6HQT5rt fvHlo/kEOGSqBrwcnJXzLiJE4uKtiS4CDBltEN1WpP3N1MBqbLj6GO5uEWQGA73F MhOzeCd3kM+41KQjdtxvIJ9yc0i/m0VLOnBTaKCqAS4bGTOl5FIIZEaY3J3+7dOP wkcdFTOxl9K+RZ5CERAUxoGqgS9r+HOvWBIQcQoD9j4UCBocwyZn8fvp6niK0CWl TR4T7UE8nAiK/QqBQ7DTqKlAkrMC3+FS5XVfw6GXJ7NFMP/HFh/AIE7oEYN+h/rQ JXPmuU9Ml0ZHuy4PLcX16YSX+T+fdNWMxL1eomHE/FUwZoNP2RC0Wi9nGxEKtLun JLGFkfQzuwfIItGYICvvOKw6Ry9Q1WYJFTdrNLCn7upUW0BnXVDVzRz7X68FJgtO uXQGChtW/PfG/KoMY544eX5lL27Kxi5oBNS/VzDtCPG0bHAAgMw= =ErDS -----END PGP SIGNATURE-----