Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 D846B306757 for ; Wed, 24 Jun 2026 16:42:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782319327; cv=none; b=e/o7MZrezMEkNCP8RCOZYIeItuMInkmphf9GDxVGAP9j4hKgCZB7zDDp08xCVK3hqHChQYUW/cwH8zk8EOD2q6jH7b0UiIbYa0DUMXUySIcExybvcE2coChZYav3F3OiN0kvNF8kFH3K1mjH61ZlauH0BGsZDr/CqvyPuTdGA7M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782319327; c=relaxed/simple; bh=0K1HizDhn/Qcpg0v167NkFcxRtMgftO+L8Z3jpYsaHA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=j481KrXHGuX/9Ha8oHa24nr0v6SpT5fKwNVtFkjAcM/6sfcRTvWnpcLKoIM1WvYiX6Zgat8oGpImqjGtwYsX/c57DgaOKtT1rAP8gBjiIDLIEF5rL52Co4mOZWxG9sIgoXbo/OpMaKNfSU55Q1hlEqDjlkO4KQEcDRM8sNpy8/8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mAAIFy4y; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mAAIFy4y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29C291F000E9; Wed, 24 Jun 2026 16:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782319326; bh=MoLjVteHBxcQo+dmtguWGiPFFzAUogo9qDa37d13puk=; h=From:To:Cc:Subject:Date:Reply-To; b=mAAIFy4yEkP3TI2kq8SolD64AtL09vwTNHRKPLsQW2uXKMzd8T2BKEHW9V3sFMfdr ns1CbyWnBCaMpVZX1hzdF8AFSokU5+w0+uzeDYh2zIAHrlbOwV46ig4TD71ow3q1I2 gOyihgops1PfNRywc+oJUXidlsuhLssb97iWZqXc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-53125: md: fix array_state=clear sysfs deadlock Date: Wed, 24 Jun 2026 17:32:29 +0100 Message-ID: <2026062417-CVE-2026-53125-819a@gregkh> X-Mailer: git-send-email 2.54.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=4130; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=L8uVNeNSAwXf27KKhM+P+wCWXPOjRHUmfpXhGmVAW8w=; b=owGbwMvMwCRo6H6F97bub03G02pJDFk2bJJdU67/v26ZK7Ag2OOG89Qz2fPyjxyfnVo9v/6Nk Pztp0tDO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiKy8zLLi87eZvZydJgzsX E4I4V1jvVDfeXsgwV2C3Rgm/2IOfF9bwBEvJ3LzywyqtBQA= 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: fix array_state=clear sysfs deadlock When "clear" is written to array_state, md_attr_store() breaks sysfs active protection so the array can delete itself from its own sysfs store method. However, md_attr_store() currently drops the mddev reference before calling sysfs_unbreak_active_protection(). Once do_md_stop(..., 0) has made the mddev eligible for delayed deletion, the temporary kobject reference taken by sysfs_break_active_protection() can become the last kobject reference protecting the md kobject. That allows sysfs_unbreak_active_protection() to drop the last kobject reference from the current sysfs writer context. kobject teardown then recurses into kernfs removal while the current sysfs node is still being unwound, and lockdep reports recursive locking on kn->active with kernfs_drain() in the call chain. Reproducer on an existing level: 1. Create an md0 linear array and activate it: mknod /dev/md0 b 9 0 echo none > /sys/block/md0/md/metadata_version echo linear > /sys/block/md0/md/level echo 1 > /sys/block/md0/md/raid_disks echo "$(cat /sys/class/block/sdb/dev)" > /sys/block/md0/md/new_dev echo "$(($(cat /sys/class/block/sdb/size) / 2))" > \ /sys/block/md0/md/dev-sdb/size echo 0 > /sys/block/md0/md/dev-sdb/slot echo active > /sys/block/md0/md/array_state 2. Wait briefly for the array to settle, then clear it: sleep 2 echo clear > /sys/block/md0/md/array_state The warning looks like: WARNING: possible recursive locking detected bash/588 is trying to acquire lock: (kn->active#65) at __kernfs_remove+0x157/0x1d0 but task is already holding lock: (kn->active#65) at sysfs_unbreak_active_protection+0x1f/0x40 ... Call Trace: kernfs_drain __kernfs_remove kernfs_remove_by_name_ns sysfs_remove_group sysfs_remove_groups __kobject_del kobject_put md_attr_store kernfs_fop_write_iter vfs_write ksys_write Restore active protection before mddev_put() so the extra sysfs kobject reference is dropped while the mddev is still held alive. The actual md kobject deletion is then deferred until after the sysfs write path has fully returned. The Linux kernel CVE team has assigned CVE-2026-53125 to this issue. Affected and fixed versions =========================== Issue introduced in 6.17 with commit 9e59d609763f70a992a8f3808dabcce60f14eb5c and fixed in 6.18.33 with commit 62c44566da7493ee48ef17e8507bb798338a07cb Issue introduced in 6.17 with commit 9e59d609763f70a992a8f3808dabcce60f14eb5c and fixed in 7.0.10 with commit 92ad0ec509ffb188d8f849b63148664df37b4a52 Issue introduced in 6.17 with commit 9e59d609763f70a992a8f3808dabcce60f14eb5c and fixed in 7.1 with commit 2aa72276fab9851dbd59c2daeb4b590c5a113908 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-2026-53125 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/62c44566da7493ee48ef17e8507bb798338a07cb https://git.kernel.org/stable/c/92ad0ec509ffb188d8f849b63148664df37b4a52 https://git.kernel.org/stable/c/2aa72276fab9851dbd59c2daeb4b590c5a113908