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 F06482882D3 for ; Wed, 18 Jun 2025 11:03:50 +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=1750244631; cv=none; b=rnBpnJBAn5FdX4Ek+2Y+uF6keG3YFY25zjDe2N9xtS4OwnfSlSuayFnnXv3HMRcFDl7SHnxDUD/rayx0MthIYZbwp+6cuDAZr41we5DMmT7NmVQB8ZlCr17pQIzludyOKH0ObgRZiy+3ZVobzK2R02CWzYl11YDjQhmwiDMUo+Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244631; c=relaxed/simple; bh=A54v6rGjgLoe48KX2rdKAo3xlkcrIWGf6QpT4fCzsg8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qJPR2+ls7IAcTjp3fVRD2e9sLQow7RFexTFOKMp3gr3eUx1T2UvYy7FFhUMBVZzA+xdaUR9UwAngeqpaQ5Oa1gc2z9b3iEOSJcViEstyLzTZZrtKkRV6eHUY+1jk9OiZfIknDAftlek+eFxQ4vOzT0AAZxTLH5ZW5Pm/9nvttMo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qW6cTTkb; 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="qW6cTTkb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 285A2C4AF0D; Wed, 18 Jun 2025 11:03:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244630; bh=A54v6rGjgLoe48KX2rdKAo3xlkcrIWGf6QpT4fCzsg8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=qW6cTTkbaRKepFaODat9k3FgRDlYKmLcWPWefSEbsHSl+UhvBj8qL47VbziG8S8Yu boGO/V03nn9MnIa+VmaafDCdJPhvIUL1sIbYsFWqpy6ER6xuc1ml95QDDIwH1/ytBL p2XgTFY6B26QYAeGyQ+Wnz193v3lNimY/hOfkcLs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49987: md: call __md_stop_writes in md_stop Date: Wed, 18 Jun 2025 13:00:52 +0200 Message-ID: <2025061823-CVE-2022-49987-1daa@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=3235; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=o8VRf+LJnoOq9Qz2DuwoSjDV12pA32raUtkVABZwTnI=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc9w/F7080SvAOHetvaa0kLD+J7N5FpE97krxl+b+O pwv6tzcEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABOxn8cwv+5lvsUOH+n/73In HpJ8sNtoxppjhQzzA14Ies1qjNBZtdx6wa056dp8PAx6AA== 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: md: call __md_stop_writes in md_stop >From the link [1], we can see raid1d was running even after the path raid_dtr -> md_stop -> __md_stop. Let's stop write first in destructor to align with normal md-raid to fix the KASAN issue. [1]. https://lore.kernel.org/linux-raid/CAPhsuW5gc4AakdGNdF8ubpezAuDLFOYUO_sfMZcec6hQFm8nhg@mail.gmail.com/T/#m7f12bf90481c02c6d2da68c64aeed4779b7df74a The Linux kernel CVE team has assigned CVE-2022-49987 to this issue. Affected and fixed versions =========================== Issue introduced in 4.12 with commit 48df498daf62e1292868005675331929305067f0 and fixed in 4.14.292 with commit 1678ca35b80a94d474fdc31e2497ce5d7ed52512 Issue introduced in 4.12 with commit 48df498daf62e1292868005675331929305067f0 and fixed in 4.19.257 with commit 690b5c90fd2d81fd1d2b6110fa36783232f6dce2 Issue introduced in 4.12 with commit 48df498daf62e1292868005675331929305067f0 and fixed in 5.4.212 with commit 8e7fb19f1a744fd34e982633ced756fee0498ef7 Issue introduced in 4.12 with commit 48df498daf62e1292868005675331929305067f0 and fixed in 5.10.140 with commit a5a58fab556bfe618b4c9719eb85712d78c6cb10 Issue introduced in 4.12 with commit 48df498daf62e1292868005675331929305067f0 and fixed in 5.15.64 with commit 661c01b2181d9413c799127f13143583b69f20fd Issue introduced in 4.12 with commit 48df498daf62e1292868005675331929305067f0 and fixed in 5.19.6 with commit f42a9819ba84bed2e609a4dff56af37063dcabdc Issue introduced in 4.12 with commit 48df498daf62e1292868005675331929305067f0 and fixed in 6.0 with commit 0dd84b319352bb8ba64752d4e45396d8b13e6018 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-2022-49987 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/1678ca35b80a94d474fdc31e2497ce5d7ed52512 https://git.kernel.org/stable/c/690b5c90fd2d81fd1d2b6110fa36783232f6dce2 https://git.kernel.org/stable/c/8e7fb19f1a744fd34e982633ced756fee0498ef7 https://git.kernel.org/stable/c/a5a58fab556bfe618b4c9719eb85712d78c6cb10 https://git.kernel.org/stable/c/661c01b2181d9413c799127f13143583b69f20fd https://git.kernel.org/stable/c/f42a9819ba84bed2e609a4dff56af37063dcabdc https://git.kernel.org/stable/c/0dd84b319352bb8ba64752d4e45396d8b13e6018