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 A01D72063DA for ; Wed, 16 Apr 2025 14:17:08 +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=1744813028; cv=none; b=a6ZB02w4EztDNjzWgXokMVQVot9KxiR84213wYSZ56t7RomH1RE1ll/v4WWVHlL4rAkZUzP2xyza/PDbrJBiSmX0mKEjgEyQeN1qb01VRN52ziat6q+1szFvZoE3wg6vYQafz4Xt2SeCH7arxQXxfqCfKVuHTtZlzl1YQ4cpsJY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744813028; c=relaxed/simple; bh=41FaECjJo68VfiKwy4Szi2yZWCq28BPzVMP+P7l+9Uo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OCSmZ9BNy/ZR0RFLpXCFCmpV543radBeq03qBCWtgwStomdxzPnLH+eyyc8zesay+mAB9c6uz3VFrLlk30kFTzYF/zIJiS9EQwdCBvnNYWbwElZoxBtbBadOXKs+OFtLcIewbYF7tAYqzBMVXzg7o+8QvpUyTSAwHY0oDqg8YRI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Mp/Al1Wj; 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="Mp/Al1Wj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CC18C4CEE2; Wed, 16 Apr 2025 14:17:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744813028; bh=41FaECjJo68VfiKwy4Szi2yZWCq28BPzVMP+P7l+9Uo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Mp/Al1WjCFgK+Uh7GW2fBSBfgfszEi75nNVV8cJHDPY6zfxKV8WSO1M5+Ez+B3wf4 mRp7qh1UHgokD90EAymK5XlFqKdAzDA1/5NICebHQMBghLbWA0gkrv6Q1hUbsHCweq toPXjMEGLJnXKpLs2Uaql+eQxuAqoLOtynDpVmac= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-22094: powerpc/perf: Fix ref-counting on the PMU 'vpa_pmu' Date: Wed, 16 Apr 2025 16:13:05 +0200 Message-ID: <2025041618-CVE-2025-22094-d447@gregkh> X-Mailer: git-send-email 2.49.0 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=3138; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=41FaECjJo68VfiKwy4Szi2yZWCq28BPzVMP+P7l+9Uo=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn/dx1S5JU3LWwoOJBQp/MiUPXk/Wvv1q5Z9+Hez4zyO Y9bPpaIdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEHlgwLFjxvnXGU7e67Ijk lNOx/aURnMbT8xkWdOnkzWubbcT5WruIJ3bRlZLDF2eLAAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: powerpc/perf: Fix ref-counting on the PMU 'vpa_pmu' Commit 176cda0619b6 ("powerpc/perf: Add perf interface to expose vpa counters") introduced 'vpa_pmu' to expose Book3s-HV nested APIv2 provided L1<->L2 context switch latency counters to L1 user-space via perf-events. However the newly introduced PMU named 'vpa_pmu' doesn't assign ownership of the PMU to the module 'vpa_pmu'. Consequently the module 'vpa_pmu' can be unloaded while one of the perf-events are still active, which can lead to kernel oops and panic of the form below on a Pseries-LPAR: BUG: Kernel NULL pointer dereference on read at 0x00000058 NIP [c000000000506cb8] event_sched_out+0x40/0x258 LR [c00000000050e8a4] __perf_remove_from_context+0x7c/0x2b0 Call Trace: [c00000025fc3fc30] [c00000025f8457a8] 0xc00000025f8457a8 (unreliable) [c00000025fc3fc80] [fffffffffffffee0] 0xfffffffffffffee0 [c00000025fc3fcd0] [c000000000501e70] event_function+0xa8/0x120 Kernel panic - not syncing: Aiee, killing interrupt handler! Fix this by adding the module ownership to 'vpa_pmu' so that the module 'vpa_pmu' is ref-counted and prevented from being unloaded when perf-events are initialized. The Linux kernel CVE team has assigned CVE-2025-22094 to this issue. Affected and fixed versions =========================== Issue introduced in 6.13 with commit 176cda0619b6c17a553625f6e2fcbc3981ad667d and fixed in 6.13.11 with commit 70ea7c5189197c6f5acdcfd8a2651be2c41e2faa Issue introduced in 6.13 with commit 176cda0619b6c17a553625f6e2fcbc3981ad667d and fixed in 6.14.2 with commit 6cf045b51e2c5721db7e55305f09ee32741e00f9 Issue introduced in 6.13 with commit 176cda0619b6c17a553625f6e2fcbc3981ad667d and fixed in 6.15-rc1 with commit ff99d5b6a246715f2257123cdf6c4a29cb33aa78 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-22094 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: arch/powerpc/perf/vpa-pmu.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/70ea7c5189197c6f5acdcfd8a2651be2c41e2faa https://git.kernel.org/stable/c/6cf045b51e2c5721db7e55305f09ee32741e00f9 https://git.kernel.org/stable/c/ff99d5b6a246715f2257123cdf6c4a29cb33aa78