In the Linux kernel, the following vulnerability has been resolved:
md: call __md_stop_writes in md_stop
From the link [1], we can see raid1d was running even after the path raid_dtr -> md_stop -> __md_stop.
Let's stop write first in destructor to align with normal md-raid to fix the KASAN issue.
[1]. https://lore.kernel.org/linux-raid/CAPhsuW5gc4AakdGNdF8ubpezAuDLFOYUO_sfMZcec6hQFm8nhg@mail.gmail.com/T/#m7f12bf90481c02c6d2da68c64aeed4779b7df74a
| Software | From | Fixed in |
|---|---|---|
| linux / linux_kernel | 4.12 | 4.14.292 |
| linux / linux_kernel | 4.15 | 4.19.257 |
| linux / linux_kernel | 4.20 | 5.4.212 |
| linux / linux_kernel | 5.5 | 5.10.140 |
| linux / linux_kernel | 5.11 | 5.15.64 |
| linux / linux_kernel | 5.16 | 5.19.6 |
| linux / linux_kernel | 6.0-rc1 | 6.0-rc1.x |
| linux / linux_kernel | 6.0-rc2 | 6.0-rc2.x |