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 318E484D0B for ; Wed, 1 May 2024 12:50:14 +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=1714567815; cv=none; b=U55b63D3V9/f1BO4/7jcB8+Cln5MW76iPvWwKx9mIo4ujgDNcR/mJPCsPWACs6egYYu3JHnc2Jy4V55/eAOU0OFNW48gnMEuVIvuf4/I3GdasEGzf/NXbec9mFLda5DbraFvRRPrn7UhRRKnoxbdq+/ZQFIB+aXB6o+eC+5KnUM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714567815; c=relaxed/simple; bh=Ef13GV5v+QOaaoeqFbC7VeSJX5kKaANlmeYlUZwgB3A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EgGJ/G7lgGahts+z4Bs6Rcrb1nE8zU65JTCi6VPRA5syBdStGDk6HWZRb0fX+69K90Zp86Wq2Qh0UGsJOn2m9+vr1uN24dSeClwmY1tTF65GSexthf7KU/Is770xj2kKmWAfuHi/Py8B8NUFJrqQo6flAx6VZtH6Q5YN58mZ0Oo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2S2f5dlq; 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="2S2f5dlq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 450A5C113CC; Wed, 1 May 2024 12:50:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714567814; bh=Ef13GV5v+QOaaoeqFbC7VeSJX5kKaANlmeYlUZwgB3A=; h=From:To:Cc:Subject:Date:Reply-to:From; b=2S2f5dlqyCtqO5wzdv6bnv0ZTbzhZpkX79vxz89Fiz8fyHWcgsTRJrGw0zSb8cbiU fzxLvcqe0ZgUt3mntKe/9bR9gOUNf+lEamV+CWUnGchVqx26PDWPq3ulWvyaw//VY0 7hASdS5x6kyczX/q36Z+oCaFxdAjpv2eK8mNyAto= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-27023: md: Fix missing release of 'active_io' for flush Date: Wed, 1 May 2024 14:50:06 +0200 Message-ID: <2024050105-CVE-2024-27023-4810@gregkh> X-Mailer: git-send-email 2.44.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=2624; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Ef13GV5v+QOaaoeqFbC7VeSJX5kKaANlmeYlUZwgB3A=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlGVrW9IdIybkd3ei589PpCsVwyg/P7T9v6Q+5rHNxxk YP5qPLbjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZgIy06GeTrXXvJMWJv8PWh/ r5NDu4SGV/7qBIb5SW6BG+t/aFzZNOubS3HVlRt90TN6AQ== 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: md: Fix missing release of 'active_io' for flush submit_flushes atomic_set(&mddev->flush_pending, 1); rdev_for_each_rcu(rdev, mddev) atomic_inc(&mddev->flush_pending); bi->bi_end_io = md_end_flush submit_bio(bi); /* flush io is done first */ md_end_flush if (atomic_dec_and_test(&mddev->flush_pending)) percpu_ref_put(&mddev->active_io) -> active_io is not released if (atomic_dec_and_test(&mddev->flush_pending)) -> missing release of active_io For consequence, mddev_suspend() will wait for 'active_io' to be zero forever. Fix this problem by releasing 'active_io' in submit_flushes() if 'flush_pending' is decreased to zero. The Linux kernel CVE team has assigned CVE-2024-27023 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.75 with commit f9f2d957a8ea and fixed in 6.1.80 with commit 6b2ff10390b1 Issue introduced in 6.6.14 with commit 530cec617f5a and fixed in 6.6.19 with commit 02dad157ba11 Issue introduced in 6.7.2 with commit c4c2345214b6 and fixed in 6.7.7 with commit 11f81438927f 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-27023 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/md/md.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/6b2ff10390b19a2364af622b6666b690443f9f3f https://git.kernel.org/stable/c/02dad157ba11064d073f5499dc33552b227d5d3a https://git.kernel.org/stable/c/11f81438927f84edfaaeb5d5f10856c3a1c1fc82 https://git.kernel.org/stable/c/855678ed8534518e2b428bcbcec695de9ba248e8