CVE-2026-53125: md: fix array_state=clear sysfs deadlock

Published Jun 24, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

md: fix arraystate=clear sysfs deadlock

When "clear" is written to arraystate, mdattrstore() breaks sysfs active protection so the array can delete itself from its own sysfs store method.

However, mdattrstore() currently drops the mddev reference before calling sysfsunbreakactiveprotection(). Once domdstop(..., 0) has made the mddev eligible for delayed deletion, the temporary kobject reference taken by sysfsbreakactiveprotection() can become the last kobject reference protecting the md kobject.

That allows sysfsunbreakactiveprotection() 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 kernfsdrain() 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/metadataversion echo linear > /sys/block/md0/md/level echo 1 > /sys/block/md0/md/raiddisks echo "$(cat /sys/class/block/sdb/dev)" > /sys/block/md0/md/newdev 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/arraystate 2. Wait briefly for the array to settle, then clear it: sleep 2 echo clear > /sys/block/md0/md/arraystate

The warning looks like:

WARNING: possible recursive locking detected bash/588 is trying to acquire lock: (kn->active#65) at kernfsremove+0x157/0x1d0 but task is already holding lock: (kn->active#65) at sysfsunbreakactiveprotection+0x1f/0x40 ... Call Trace: kernfsdrain kernfsremove kernfsremovebynamens sysfsremovegroup sysfsremovegroups kobjectdel kobjectput mdattrstore kernfsfopwriteiter vfswrite ksyswrite

Restore active protection before mddevput() 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.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Linux kernel md: fix array_state=clear sysfs deadlock to a version that resolves this vulnerability.

    Patch bash/588
  2. Compensating control

    As a practical workaround during recovery/mitigation windows, avoid writing “clear” to /sys/block/md0/md/array_state while the mddev’s sysfs writer context is active; instead, wait briefly for the array to settle before clearing (the material explicitly mentions “Wait briefly for the array to settle, then clear it”).

Event History

Jun 24, 2026
CVE Published
via MITRE·04:30 PM
Data Sourced
via MITRE·04:30 PM
Description
Data Sourced
via NVD·05:17 PM
Description

Frequently Asked Questions

1

What is the severity of CVE-2026-53125?

The severity of CVE-2026-53125 is rated as risk level 27.

2

How do I fix CVE-2026-53125?

To fix CVE-2026-53125, ensure you update to the latest version of the Linux kernel where the vulnerability has been resolved.

3

What products are affected by CVE-2026-53125?

CVE-2026-53125 affects the Linux kernel specifically related to the md subsystem.

4

What is the impact of CVE-2026-53125?

The impact of CVE-2026-53125 includes potential deadlock situations when interacting with sysfs related to array state management.

5

When was CVE-2026-53125 published?

CVE-2026-53125 was published on June 24, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203