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 4308730F950 for ; Tue, 28 Oct 2025 11:54:49 +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=1761652490; cv=none; b=Ged6vUmh5Mo5CcJsUIEAcEuBy9+CBCTyZY8jlWbnmYMz/hMNl+Z+uyHLtPLNHKCjDsp09bBYE+Ml4AsfKAxuxDrm1Kui5uvw4zgfE1DRlSNfPZNAXxygM3mFY/GfRdcxJLxnn69jw18cI3GLrIuT12UY57enFquLjEGllO/3Vpo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761652490; c=relaxed/simple; bh=+uF3S9pAHoSx68f/gGkraQj8+h4UjeDUyf+c45t74y8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZIUYWXJXuM3VSQBwnPu2F17WPILGUYRzQp1+eMN4nRjNpQ5Mrp1j10uSPKJnim4kYOxqa0TwzPbfB7WPmwkkZj2ElZJYTlqkSHhOICTO08WT9zpy/X18lq6j5EBoJJrJnoINIdwsfMpNHRfoefrxdb08BDGnPAfFqbM2Pz+yPUM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FPovVF4p; 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="FPovVF4p" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B1DEC4CEE7; Tue, 28 Oct 2025 11:54:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761652489; bh=+uF3S9pAHoSx68f/gGkraQj8+h4UjeDUyf+c45t74y8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=FPovVF4pKWJsQ8OdUuHIhuDf/U2kLnrpkPirQdnit0q3bVG6CeturBM21epeiElyp WuXazZnYbpCwnDIwATEftGlOsyxT0heWckURhh9t/TI0kmr2VTXNY8ZZnqmpFczmTi idiHzqwgwC50kXhkrSTHFWtw98tlFr3xwwLqCwZ0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40060: coresight: trbe: Return NULL pointer for allocation failures Date: Tue, 28 Oct 2025 12:48:37 +0100 Message-ID: <2025102816-CVE-2025-40060-eb50@gregkh> X-Mailer: git-send-email 2.51.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=3128; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=TK7sMEw7vcDt42AOhuboG6+iDpAKReyeG/8xdTJz0wU=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkMaxtE719pqrz0mI/3sde26pPSmkt2Wcq8e+KRLy1qr DyThVm0I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYy6zbDglZt8SsrzOQ0Nr3j /WH9JnOB4s3O3QwLNnUzS8Z3FS63LNm+h2WxxYZ9V7Z5AwA= 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: coresight: trbe: Return NULL pointer for allocation failures When the TRBE driver fails to allocate a buffer, it currently returns the error code "-ENOMEM". However, the caller etm_setup_aux() only checks for a NULL pointer, so it misses the error. As a result, the driver continues and eventually causes a kernel panic. Fix this by returning a NULL pointer from arm_trbe_alloc_buffer() on allocation failures. This allows that the callers can properly handle the failure. The Linux kernel CVE team has assigned CVE-2025-40060 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit 3fbf7f011f2426dac8c982f1d2ef469a7959a524 and fixed in 5.15.195 with commit cef047e0a55cb07906fcaae99170f19a9c0bb6c2 Issue introduced in 5.13 with commit 3fbf7f011f2426dac8c982f1d2ef469a7959a524 and fixed in 6.1.156 with commit fe53a726d5edf864e80b490780cc135fc1adece9 Issue introduced in 5.13 with commit 3fbf7f011f2426dac8c982f1d2ef469a7959a524 and fixed in 6.6.112 with commit 9768536f82600a05ce901e31ccfabd92c027ff71 Issue introduced in 5.13 with commit 3fbf7f011f2426dac8c982f1d2ef469a7959a524 and fixed in 6.12.53 with commit 296da78494633e1ab5e2e74173a9c8683b04aa6b Issue introduced in 5.13 with commit 3fbf7f011f2426dac8c982f1d2ef469a7959a524 and fixed in 6.17.3 with commit f505a165f1c7cd37b4cb6952042a5984693a4067 Issue introduced in 5.13 with commit 3fbf7f011f2426dac8c982f1d2ef469a7959a524 and fixed in 6.18-rc1 with commit 8a55c161f7f9c1aa1c70611b39830d51c83ef36d 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-40060 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: drivers/hwtracing/coresight/coresight-trbe.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/cef047e0a55cb07906fcaae99170f19a9c0bb6c2 https://git.kernel.org/stable/c/fe53a726d5edf864e80b490780cc135fc1adece9 https://git.kernel.org/stable/c/9768536f82600a05ce901e31ccfabd92c027ff71 https://git.kernel.org/stable/c/296da78494633e1ab5e2e74173a9c8683b04aa6b https://git.kernel.org/stable/c/f505a165f1c7cd37b4cb6952042a5984693a4067 https://git.kernel.org/stable/c/8a55c161f7f9c1aa1c70611b39830d51c83ef36d