CVE-2026-139541: md/raid5: drain released_stripes before destroying the cache
In the Linux kernel, the following vulnerability has been resolved:
md/raid5: drain releasedstripes before destroying the cache
growonestripe() calls raid5releasestripe() for each new stripe. When mddev->thread is already set, that queues the stripe on conf->releasedstripes and wakes the thread. Only raid5d moves that list onto inactivelist.
Takeover calls setupconf() while mddev->thread still belongs to the previous personality, so those stripes stay on releasedstripes. If setupconf() then fails, shrinkstripes() only frees inactivelist and kmemcachedestroy() warns that objects remain.
Move stripes still queued on releasedstripes onto inactivelist before shrinkstripes() frees them.
Affected Software
Event History
Frequently Asked Questions
When can this issue be triggered?
It can occur during an md/raid5 personality takeover when the existing mddev thread is still associated with the previous personality, setup_conf() fails, and newly created stripes have been queued on released_stripes.
What is the observable impact?
Stripes left on released_stripes are not freed by shrink_stripes(), which only frees inactive_list. Destroying the stripe cache can then warn that objects remain.
How does the fix address the problem?
Before shrink_stripes() destroys the cache, the fix moves stripes queued on released_stripes to inactive_list so they can be freed.