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 3AEC6316193 for ; Wed, 24 Dec 2025 10:37:28 +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=1766572648; cv=none; b=iGJa3qxKm86//oFZdtM75g1rvxvK260Ih3fOnAiEkmQ8airitSgNZSOJajKA9EsK9f3Acr8EtThQZeGICD2snsbV79eg8ykjh+asuPlijw4KLJkMOrWcXpnbuqSt1idHTa86+sRlEnV3B6QpNbbWcC+yANymcMXiJo4n3LEQZ2w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766572648; c=relaxed/simple; bh=78dgWb6tyBF4jA12x4cRKm68Hv7BtgtPCxHA6mE4Ej4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EjGDg1Q2I0fa84BJMyH0KaI7xJrrnbeUnIwNHm02C0tBSpTJhQX7/uJbJ/dj/m+wIirEQ/EWMMf8iIWtl3mnjbzWAA59qFiZ1wvVLs+OljgB9n9nNwFhyywt/CP2O5b85N6RJuRDU8wMfthReBoJz8xNxyKLVjIsy1uaxmpgI8Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=h7e8ddUj; 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="h7e8ddUj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1534C4CEFB; Wed, 24 Dec 2025 10:37:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766572648; bh=78dgWb6tyBF4jA12x4cRKm68Hv7BtgtPCxHA6mE4Ej4=; h=From:To:Cc:Subject:Date:Reply-To:From; b=h7e8ddUjDKPQtNjThP99Z9DFESSJGdxeSd0N0wSdD8Il9lJNrSom25Nxed7IX2Q/X wcV4wTVlO37wewGfwBaWZpKm/Fek0Iqmd2I3Lbt+6I278zx8lQeaJn+I6nbzN8bgUQ d2bi/TlZPASxyr8VBBLYr1JbRFXE2y9Gfg7/LuAE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-68373: md: avoid repeated calls to del_gendisk Date: Wed, 24 Dec 2025 11:35:18 +0100 Message-ID: <2025122401-CVE-2025-68373-c983@gregkh> X-Mailer: git-send-email 2.52.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=2883; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=CkquDQUDRLvEM1GerqNk9Us2z/vSZoB9Oxd7SlmlrZg=; b=owGbwMvMwCRo6H6F97bub03G02pJDJneB68Kc7BF/+NJ7ppne6sqydGn0svv6D0pXxfDWyuX1 3C5lTV2xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwEROOTDM9/2++XBcMpdb+oHL WUf1fTLOHd2jy7Dg8tolF/Y9TTt14sIlBYlv86eWTD5eBQA= 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: avoid repeated calls to del_gendisk There is a uaf problem which is found by case 23rdev-lifetime: Oops: general protection fault, probably for non-canonical address 0xdead000000000122 RIP: 0010:bdi_unregister+0x4b/0x170 Call Trace: __del_gendisk+0x356/0x3e0 mddev_unlock+0x351/0x360 rdev_attr_store+0x217/0x280 kernfs_fop_write_iter+0x14a/0x210 vfs_write+0x29e/0x550 ksys_write+0x74/0xf0 do_syscall_64+0xbb/0x380 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff5250a177e The sequence is: 1. rdev remove path gets reconfig_mutex 2. rdev remove path release reconfig_mutex in mddev_unlock 3. md stop calls do_md_stop and sets MD_DELETED 4. rdev remove path calls del_gendisk because MD_DELETED is set 5. md stop path release reconfig_mutex and calls del_gendisk again So there is a race condition we should resolve. This patch adds a flag MD_DO_DELETE to avoid the race condition. The Linux kernel CVE team has assigned CVE-2025-68373 to this issue. Affected and fixed versions =========================== Issue introduced in 6.17 with commit 9e59d609763f70a992a8f3808dabcce60f14eb5c and fixed in 6.17.13 with commit b4c5cf406062ad44cd178269571530c6435b2f3b Issue introduced in 6.17 with commit 9e59d609763f70a992a8f3808dabcce60f14eb5c and fixed in 6.18.2 with commit f0fae1debeb9102398ddf2ef69b4f5d395afafed Issue introduced in 6.17 with commit 9e59d609763f70a992a8f3808dabcce60f14eb5c and fixed in 6.19-rc1 with commit 90e3bb44c0a86e245d8e5c6520206fa113acb1ee 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-68373 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 drivers/md/md.h 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/b4c5cf406062ad44cd178269571530c6435b2f3b https://git.kernel.org/stable/c/f0fae1debeb9102398ddf2ef69b4f5d395afafed https://git.kernel.org/stable/c/90e3bb44c0a86e245d8e5c6520206fa113acb1ee