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 DFEFE2571C7 for ; Tue, 19 Aug 2025 17:18:55 +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=1755623936; cv=none; b=XLog4frfzFGzEoCiku2fMyhZULNjk5iP45Z4/vgAU+dhQoKduBaohtyez4CZVpZmze7wpYazfpDZOztxJEQ35Evk8KvD6YtrTuaKQcOWh3Mf/I8X4djnvYy7YLHrAJIdWFxGfAOu/qPaGtWMHHwAfx5iD5fBOu2JNT58ZZDPbk4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755623936; c=relaxed/simple; bh=RwrYL04pp70qKf/5WO0yl66WCtyNTjG8VhAGtQvXfyc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=M+fecTYVvzWrNC9gRGd9rp47xbuHUH28z7DfmfjwUQo3ONgk0mJno53W8tZJ2QBdLLpJd60j/3rRVUkLFeoQ5320uvjcEo2qBE64pTWNENfl82xbHYA+We4Wb/97mtPVC8y0OCmWcZG4saDdEUKPP5CtCOv8rFe1wMQCX+jlpZA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Illkz05f; 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="Illkz05f" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC6DEC4CEF1; Tue, 19 Aug 2025 17:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755623935; bh=RwrYL04pp70qKf/5WO0yl66WCtyNTjG8VhAGtQvXfyc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Illkz05fuAV67PJPjm1aFMMx9Yh5rJ6Y5uUqKkHx8htelbdKKlO3hbfF6V537aTkb L5CFeVLfLVdWqdzqSbCpYFcPT0fKqSPf82sujEpU0TC5A0vZrPPn1/nnIkeA3sDBvd u0tI3Wlk+gU+ky5uiCj2krssm60mdTGG6o9+ZkCo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38565: perf/core: Exit early on perf_mmap() fail Date: Tue, 19 Aug 2025 19:18:12 +0200 Message-ID: <2025081908-CVE-2025-38565-0f60@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=3005; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=C0+BCNHN2ekFfGnkVyw+EFB1pK1eVaj2/IQuNYsnfw8=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlLNl6YK2Zo6frX9Wx1oOxT7qKdZ2e2d+u2L12x6Mgx7 XiLa5srO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiX/4yLLiQ2LJOot3w5Qzf axZXPy+R2T5ZK5BhnnbbmzyRO6qnJjFGr9Mq7FT/qhLCDgA= 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: perf/core: Exit early on perf_mmap() fail When perf_mmap() fails to allocate a buffer, it still invokes the event_mapped() callback of the related event. On X86 this might increase the perf_rdpmc_allowed reference counter. But nothing undoes this as perf_mmap_close() is never called in this case, which causes another reference count leak. Return early on failure to prevent that. The Linux kernel CVE team has assigned CVE-2025-38565 to this issue. Affected and fixed versions =========================== Issue introduced in 4.0 with commit 1e0fb9ec679c9273a641f1d6f3d25ea47baef2bb and fixed in 6.1.148 with commit 27d44145bd576bbef9bf6165bcd78128ec3e6cbd Issue introduced in 4.0 with commit 1e0fb9ec679c9273a641f1d6f3d25ea47baef2bb and fixed in 6.6.102 with commit f41e9eba77bf97626e04296dc5677d02816d2432 Issue introduced in 4.0 with commit 1e0fb9ec679c9273a641f1d6f3d25ea47baef2bb and fixed in 6.12.42 with commit 92043120a2e992800580855498ab8507e1b22db9 Issue introduced in 4.0 with commit 1e0fb9ec679c9273a641f1d6f3d25ea47baef2bb and fixed in 6.15.10 with commit 163b0d1a209fe0df5476c1df2330ca12b55abf92 Issue introduced in 4.0 with commit 1e0fb9ec679c9273a641f1d6f3d25ea47baef2bb and fixed in 6.16.1 with commit 7ff8521f30c4c2fcd4e88bd7640486602bf8a650 Issue introduced in 4.0 with commit 1e0fb9ec679c9273a641f1d6f3d25ea47baef2bb and fixed in 6.17-rc1 with commit 07091aade394f690e7b655578140ef84d0e8d7b0 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-38565 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/events/core.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/27d44145bd576bbef9bf6165bcd78128ec3e6cbd https://git.kernel.org/stable/c/f41e9eba77bf97626e04296dc5677d02816d2432 https://git.kernel.org/stable/c/92043120a2e992800580855498ab8507e1b22db9 https://git.kernel.org/stable/c/163b0d1a209fe0df5476c1df2330ca12b55abf92 https://git.kernel.org/stable/c/7ff8521f30c4c2fcd4e88bd7640486602bf8a650 https://git.kernel.org/stable/c/07091aade394f690e7b655578140ef84d0e8d7b0