Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 365E93A7F6D for ; Fri, 11 Sep 2026 19:51:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156286; cv=none; b=TZgUlirBD1ofB+nhc/yA+egcJg1DO0mXqNzv3iXZqhCKlIdKAZaU9jd2hYn+Z78/mtotnrufKYXH8Vdjr3Di2XgH05HecB1b/IlNfD/TBIrmIr5GKaiVVL9JvjTfa5kx9GcXOVtgiSDpURNtfBuJebIbhPKg8DZC+ZDh/xG7qv8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156286; c=relaxed/simple; bh=s50q2Sh2A0xSxxa7SvVfCduY1ywNGcpd3OqNbY/Tclw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AGHa5reRw6W5iRU5SmHQrwrqJsqUBewG76MTarYdCAICqzZC+oRg0SBloJ5moxWbAWbTqax+RYval6MmEo3FnNxnv27dMnGf7bmCvkPg0bgyrzmV8a5FOk8mxvkZd0qa4CcCLRnvrBkrfWw9I5pDlZg52hhgNaHBiJis9h+Cdko= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=f1j0B1uJ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="f1j0B1uJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FFD21F00898; Fri, 11 Sep 2026 19:51:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789156269; bh=Yvmom/dqKZnWhhJ5PFgJ3XA8W6yuXR3cq9d8EaPu1wM=; h=From:To:Cc:Subject:Date:Reply-To; b=f1j0B1uJm22tDqJZUoCZCDDrsm78fsb/1ppElGUVjpQSCkJ33YuUTDIJVesP+1TXA CX7zXIrooccuqL2PU9IwphR7wijPCwb5vAFPjm3DdVO4V9nBlUDYKZpoxIe14N9jEU 4bDxdUbAewEhSsNHHDgldaR/FkIkLJn5Hlds3Y4g= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89460: s390/cpum_cf: Handle CPU hotplug via prepare/dead callbacks Date: Fri, 11 Sep 2026 21:42:29 +0200 Message-ID: <2026091100-CVE-2026-89460-8729@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5196; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=+dFPgSCnOH92rGmG2Or2dwrIJoyZehVg4d8W0V3nCJs=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlLIn0Emh4rzk7ef/jixYJ/ToHMVmuW+BY/yF4RFP1Wf ef2s6ozOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi3F0Mc8Vn9O3TTLs31f54 Uumak/rXzt08uIphfunOhqU2/w44r5++7TLDuYp/K7Z9iwMA 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: s390/cpum_cf: Handle CPU hotplug via prepare/dead callbacks The command 'perf stat -e cycles -- ' crashes the kernel when CPUs are hotplug added during that run. Root cause is the allocation of struct cpu_cf_events at first event initialization. The allocation is dynamic and the first event that has task context creates such a structure for each online CPU. This is not sufficient. CPUs may be offline during event creation and can be set online during the perf run time. For example commands # echo 0 > /sys/devices/system/cpu/cpu1/online # perf stat -e cycles -i -- stress-ng -t10s --matrix X # sleep 1 # echo 1 > /sys/devices/system/cpu/cpu1/online create an event for CPUs 0,2-X. Since the events are created with task-context, the scheduler will eventually schedule the program on CPU1. This CPU has not created and initialized any per CPU event infrastructure as that CPU was not online at the time of the perf invocation. Thus when the scheduler runs stress-ng on CPU1, the function cpumf_pmu_add() refers to a NULL pointer: struct cpu_cf_events *cpuhw = this_cpu_cfhw(); This function call is invoked after the task stress-ng has been made runnable on CPU1. And this_cpu_cfhw() returns NULL. The result is a panic: Unable to handle kernel pointer dereference in virtual kernel address space Failing address: 0000000000000000 TEID: 0000000000000483 .... Krnl PSW : 0404d00180000000 000003ef8291fd0c (cpumf_pmu_add+0x3c/0x80) .... Call Trace: [<000003ef8291fd0c>] cpumf_pmu_add+0x3c/0x80 [<000003ef82bb5e3e>] event_sched_in+0xae/0x190 [<000003ef82bb60d6>] merge_sched_in+0x1b6/0x390 [<000003ef82bb65b8>] visit_groups_merge.constprop.0.isra.0+0x308/0x5b0 [<000003ef82bb689a>] pmu_groups_sched_in+0x3a/0x50 [<000003ef82bb6a30>] ctx_sched_in+0x180/0x260 [<000003ef82bb780c>] perf_event_context_sched_in+0x11c/0x2d0 [<000003ef82bb79ee>] __perf_event_task_sched_in+0x2e/0xc0 [<000003ef82994834>] finish_task_switch.isra.0+0x1a4/0x250 .... Last Breaking-Event-Address: [<000003ef8291f1d8>] this_cpu_cfhw+0x38/0x40 The issue arises only in per-task context when the CPUMF facility is used and the scheduler picks a random CPU for such a process to run on. The scheduler enables the CPUMF infrastructure via PMU callback functions pmu::add() and pmu::del(). Introduce a CPU hotplug prepare/dead callback pair which creates and removes the per CPU counter data while the CPU is offline. Count the users which track every CPU (cpu == -1), that is perf_event_open() events with task context and /dev/hwctr device sessions, in the new counter cpu_cf_root::tskcnt, protected by pmc_reserve_mutex. This ensures the infrastructure is available when new CPU is selected to run the per-task context process. In cpum_cf_free_root() and cpum_cf_free_cpu() ensure the reference pointer to data structures is set to NULL before the data is freed to prevent interrupt handlers to access stale data. [gor@linux.ibm.com: change commit message] The Linux kernel CVE team has assigned CVE-2026-89460 to this issue. Affected and fixed versions =========================== Issue introduced in 6.5 with commit 9b9cf3c77e7e090b30657b3d2c288deb58dfb4f2 and fixed in 6.12.109 with commit 777d040c2f91d8d929b4a32333dfe4102b27caea Issue introduced in 6.5 with commit 9b9cf3c77e7e090b30657b3d2c288deb58dfb4f2 and fixed in 6.18.50 with commit dcce7a06ea690d5cf46a705a9b74cf0398ac091f Issue introduced in 6.5 with commit 9b9cf3c77e7e090b30657b3d2c288deb58dfb4f2 and fixed in 7.2.4 with commit 71d46de9153e067c63a15f3b00e6364e1c0230f8 Issue introduced in 6.5 with commit 9b9cf3c77e7e090b30657b3d2c288deb58dfb4f2 and fixed in 7.3-rc1 with commit 337bd95507a16063687cfc286ea90de5cca48c37 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-2026-89460 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/s390/kernel/perf_cpum_cf.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/777d040c2f91d8d929b4a32333dfe4102b27caea https://git.kernel.org/stable/c/dcce7a06ea690d5cf46a705a9b74cf0398ac091f https://git.kernel.org/stable/c/71d46de9153e067c63a15f3b00e6364e1c0230f8 https://git.kernel.org/stable/c/337bd95507a16063687cfc286ea90de5cca48c37