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 1D32B31355E for ; Wed, 24 Dec 2025 10:36:04 +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=1766572566; cv=none; b=Zm4UEVLobq/4aN/b6CG4d9dac91RjU2wyUaJD2DyUSPC6sDmD37u7O3VfYgeUTdtxCW1duFB0xSR6i+emPJnpjgJESl/SAJtZTKtgrPqLqzSebTqYOAry3Ds3MdXBPTqZmRb9svD7jOE+ax9bgISFkKHScTRENVg/rR51/lB75w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766572566; c=relaxed/simple; bh=hkKbLeQzHYMjrGPqDeicwtzaJAxV7j/1E5f5mw/+7zo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=T61NutsKFQ7R9NBoN/h3W+tirOcSl8vJihFba8/0dRDaCKyedb9QALHCQBcz2W3LlIAIiWiOlGm8u5s2SEkoSiWEWY+WXYCNYevKm3Z81bbjyF6ttR4C6KIxTQ13Fpz99tsQaoLmVF9i9JKgvDBTcxOSlcbw/TWterHbFg8fF4A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UmBkccDq; 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="UmBkccDq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DD95C4CEFB; Wed, 24 Dec 2025 10:36:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766572564; bh=hkKbLeQzHYMjrGPqDeicwtzaJAxV7j/1E5f5mw/+7zo=; h=From:To:Cc:Subject:Date:Reply-To:From; b=UmBkccDqN/bb2swvyMB9vbpcASjXpAWXbRzI+IYwQkTKVLhMjccHwVmqA/yW3ZeYR wfiin9uKM7Vsl1tAanWpjycT9B6X2jRzN5B/oY4cIafmBFrhQpIR3Tjylkm0fTmbjJ hhV0HUN1bJ2WITqVJ68f0lqKdqMapRYSvNCIi/Uk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-68368: md: init bioset in mddev_init Date: Wed, 24 Dec 2025 11:35:13 +0100 Message-ID: <2025122400-CVE-2025-68368-4e1b@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=2570; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=oh8qTHuPks4sM0YGm0Yt5hi2lUelAsviVaj1Nmaah/k=; b=owGbwMvMwCRo6H6F97bub03G02pJDJneB6/M9zN8eqDHwCVI6mDBnS1KfM2Jt4/qRbvaRfKrS TEFHKvuiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgImY2jMsaP44qT/mQaz/zJvq ZjP+NC84/qd4AcOCy926c4t3tmYa6L26adXa+6B7475oAA== 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: init bioset in mddev_init IO operations may be needed before md_run(), such as updating metadata after writing sysfs. Without bioset, this triggers a NULL pointer dereference as below: BUG: kernel NULL pointer dereference, address: 0000000000000020 Call Trace: md_update_sb+0x658/0xe00 new_level_store+0xc5/0x120 md_attr_store+0xc9/0x1e0 sysfs_kf_write+0x6f/0xa0 kernfs_fop_write_iter+0x141/0x2a0 vfs_write+0x1fc/0x5a0 ksys_write+0x79/0x180 __x64_sys_write+0x1d/0x30 x64_sys_call+0x2818/0x2880 do_syscall_64+0xa9/0x580 entry_SYSCALL_64_after_hwframe+0x4b/0x53 Reproducer ``` mdadm -CR /dev/md0 -l1 -n2 /dev/sd[cd] echo inactive > /sys/block/md0/md/array_state echo 10 > /sys/block/md0/md/new_level ``` mddev_init() can only be called once per mddev, no need to test if bioset has been initialized anymore. The Linux kernel CVE team has assigned CVE-2025-68368 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit d981ed8419303ed12351eea8541ad6cb76455fe3 and fixed in 6.18.2 with commit 9d37fe37dfa0833a8768740f0575e0ffd793cb4a Issue introduced in 6.12 with commit d981ed8419303ed12351eea8541ad6cb76455fe3 and fixed in 6.19-rc1 with commit 381a3ce1c0ffed647c9b913e142b099c7e9d5afc 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-68368 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/9d37fe37dfa0833a8768740f0575e0ffd793cb4a https://git.kernel.org/stable/c/381a3ce1c0ffed647c9b913e142b099c7e9d5afc