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 5A6F086344 for ; Sat, 28 Dec 2024 09:47:46 +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=1735379266; cv=none; b=BFk+UBargu9zwUv3ukRxcYKfh0wsG/Ro1V0gFPfZCqhzLtkQ3ZEDl3uqsme49Dd+zTY7frQMdt9okFHDGgfEfS37LnfP4aqzX3WRvS2z/xIp7nCGXUdOWRi4JPqTBJTJeUu78W3nKX9c/V5nRkjZGxXbmKpcuESKwn+3jg7h0vE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735379266; c=relaxed/simple; bh=JOOOTE821jXvpdQ4sMmDOGM3MDM7WfSDu9qjg/UWa6A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=JAQklyp5j5nLGsOx3chAM3r/kXq+lpX+HbFxDMYe5xixkSMEO6z0w1CVwNsomtqW/vPyWgcnWEeZp9nylKSJhh6WYmIkCnpZtJD/0FUHbX6m2MXXoF96dNzHP6UDNuyhjL1OyAKGX15SMwCGoYMtzvw9pEh1bfYdx/VDS6OA+xI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OTiZOqed; 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="OTiZOqed" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D31EAC4CECD; Sat, 28 Dec 2024 09:47:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735379266; bh=JOOOTE821jXvpdQ4sMmDOGM3MDM7WfSDu9qjg/UWa6A=; h=From:To:Cc:Subject:Date:Reply-to:From; b=OTiZOqedB9vaiWSugES292VIkLlGKTZt2kvvblT3P/QihtFKmXWzewHTZAC5sOnys gqR2GT+sVry9bPcjps2ZwKEhOoadq75t4wudWz9I1TJgXBOKGi8AKPaudNxk/O6c9O 3GUerUz/yCew0PnIr1dUEXLRoLaGkJ17+/YZv6iM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56706: s390/cpum_sf: Fix and protect memory allocation of SDBs with mutex Date: Sat, 28 Dec 2024 10:45:58 +0100 Message-ID: <2024122838-CVE-2024-56706-d292@gregkh> X-Mailer: git-send-email 2.47.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=2385; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=JOOOTE821jXvpdQ4sMmDOGM3MDM7WfSDu9qjg/UWa6A=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn5Jw4xsYpt2eQu3h//WDhfZdpFN4m/0WWGRU9erdusc zAqtF+tI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbyiJVhDhfLjH03Qmx/SPDN nb8/XyQlL3auI8P8eun5mzeser51rdmz4yGqFx7MqfvXAwA= 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: s390/cpum_sf: Fix and protect memory allocation of SDBs with mutex Reservation of the PMU hardware is done at first event creation and is protected by a pair of mutex_lock() and mutex_unlock(). After reservation of the PMU hardware the memory required for the PMUs the event is to be installed on is allocated by allocate_buffers() and alloc_sampling_buffer(). This done outside of the mutex protection. Without mutex protection two or more concurrent invocations of perf_event_init() may run in parallel. This can lead to allocation of Sample Data Blocks (SDBs) multiple times for the same PMU. Prevent this and protect memory allocation of SDBs by mutex. The Linux kernel CVE team has assigned CVE-2024-56706 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit 8a6fe8f21ec4f049a7b1fe120ad50a5065a9c7a8 and fixed in 6.12.2 with commit 4b3bdfa89635db6a53e02955548bd07bebcae233 Issue introduced in 6.12 with commit 8a6fe8f21ec4f049a7b1fe120ad50a5065a9c7a8 and fixed in 6.13-rc1 with commit f55bd479d8663a4a4e403b3d308d3d1aa33d92df 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-2024-56706 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_sf.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/4b3bdfa89635db6a53e02955548bd07bebcae233 https://git.kernel.org/stable/c/f55bd479d8663a4a4e403b3d308d3d1aa33d92df