From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A7B5BE46 for ; Sat, 16 Aug 2025 11:14:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755342874; cv=none; b=PfKP/UKUNTu5azGQl1wk8IQJAKnzhvbFwVaZ9ci4s/63+jwz86tqakNXqBdwSJD5xiv+GDJRtL0hXSQBmtgsN/6Sr0eZF3zj8e5kMymztwPoErGgrzVAU5RdYiX+JaQXAFspIzmpuyT3tjRZWhU/7/6bTF+ZDRsONKfARYPGKi4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755342874; c=relaxed/simple; bh=s/tk4AT43tA/aLAqN9R7dlzUoZNowLTFeu/yvjZ8h6Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HFa9vP5T7zp38Z736HudJehGHh4JxWfBhqZgq2c5dkKSZwai3UZiQj/YgRpHb2vMGDNzbhO/SbaMntzm8/ZRV5V2hcmtyKOtnqdxGEoUhoNMLqTGiHGALwjrCj2rLUZXI4ZyxLFf1Mg2ieyc4qP+HdijF652Azq8ECJMfM3ZM5Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=j5b2XZ9b; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="j5b2XZ9b" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06B41C4CEEF; Sat, 16 Aug 2025 11:14:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755342874; bh=s/tk4AT43tA/aLAqN9R7dlzUoZNowLTFeu/yvjZ8h6Y=; h=From:To:Cc:Subject:Date:Reply-to:From; b=j5b2XZ9b/CVeliKWCVO9u8FQELE8DG5PdRyK9aXuW+kJVa7GeeppeDS+ywfJ7H2ey 5w1E+Vkx+lKaOUIVWM9WgQBYC5Bz8WMkx0rX25rUW39OxXPuLOArVv9J3exlWv96uY 7SnPKw6jHJdkFnzOJbFFLYU/9N8bHKXsdFrfzEWw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38539: tracing: Add down_write(trace_event_sem) when adding trace event Date: Sat, 16 Aug 2025 13:14:10 +0200 Message-ID: <2025081657-CVE-2025-38539-fdcd@gregkh> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3065; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=XoQZe3G5lIAby4+oemrGva/BxOFaoiVi4g0MFiUZ/xE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkL0r+d+ed9c/dDj8BwD04llop3+WI6/Puc5vZZ7dLjy 1O48FWtI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACaiGsowz6gxLfaI5rNd92eU TMhmm9gyh/f+dIYFO6O0BIV9k649ULtj/uT2Isew1y7XAQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: tracing: Add down_write(trace_event_sem) when adding trace event When a module is loaded, it adds trace events defined by the module. It may also need to modify the modules trace printk formats to replace enum names with their values. If two modules are loaded at the same time, the adding of the event to the ftrace_events list can corrupt the walking of the list in the code that is modifying the printk format strings and crash the kernel. The addition of the event should take the trace_event_sem for write while it adds the new event. Also add a lockdep_assert_held() on that semaphore in __trace_add_event_dirs() as it iterates the list. The Linux kernel CVE team has assigned CVE-2025-38539 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.31 with commit 110bf2b764eb6026b868d84499263cb24b1bcc8d and fixed in 6.1.147 with commit 7803b28c9aa8d8bd4e19ebcf5f0db9612b0f333b Issue introduced in 2.6.31 with commit 110bf2b764eb6026b868d84499263cb24b1bcc8d and fixed in 6.6.100 with commit 6bc94f20a4c304997288f9a45278c9d0c06987d3 Issue introduced in 2.6.31 with commit 110bf2b764eb6026b868d84499263cb24b1bcc8d and fixed in 6.12.40 with commit 33e20747b47ddc03569b6bc27a2d6894c1428182 Issue introduced in 2.6.31 with commit 110bf2b764eb6026b868d84499263cb24b1bcc8d and fixed in 6.15.8 with commit 70fecd519caad0c1741c3379d5348c9000a5b29d Issue introduced in 2.6.31 with commit 110bf2b764eb6026b868d84499263cb24b1bcc8d and fixed in 6.16 with commit b5e8acc14dcb314a9b61ff19dcd9fdd0d88f70df Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-38539 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: kernel/trace/trace_events.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/7803b28c9aa8d8bd4e19ebcf5f0db9612b0f333b https://git.kernel.org/stable/c/6bc94f20a4c304997288f9a45278c9d0c06987d3 https://git.kernel.org/stable/c/33e20747b47ddc03569b6bc27a2d6894c1428182 https://git.kernel.org/stable/c/70fecd519caad0c1741c3379d5348c9000a5b29d https://git.kernel.org/stable/c/b5e8acc14dcb314a9b61ff19dcd9fdd0d88f70df