Overview
About vulnerability
In the Linux kernel, the following vulnerability has been resolved:
md/bitmap: fix GPF in write_page caused by resize race
A General Protection Fault occurs in write_page() during array resize: RIP: 0010:write_page+0x22b/0x3c0 [md_mod]
This is a use-after-free race between bitmap_daemon_work() and
__bitmap_resize(). The daemon iterates over bitmap->storage.filemap
without locking, while the resize path frees that storage via
md_bitmap_file_unmap(). quiesce() does not stop the md thread,
allowing concurrent access to freed pages.
Fix by holding mddev->bitmap_info.mutex during the bitmap update.
Details
- Affected product:
- AlmaLinux 9.2 ESU , CentOS 7 ELS , CentOS 8.4 ELS , CentOS 8.5 ELS , CentOS Stream 8 ELS , CloudLinux 7 ELS , Oracle Linux 7 ELS , RHEL 7 ELS , TuxCare 9.6 ESU , Ubuntu 16.04 ELS , Ubuntu 18.04 ELS , Ubuntu 20.04 ELS
- Affected packages:
- kernel @ 3.10.0 (+13 more)
In the Linux kernel, the following vulnerability has been resolved:
md/bitmap: fix GPF in write_page caused by resize race
A General Protection Fault occurs in write_page() during array resize: RIP: 0010:write_page+0x22b/0x3c0 [md_mod]
This is a use-after-free race between bitmap_daemon_work() and
__bitmap_resize(). The daemon iterates over bitmap->storage.filemap
without locking, while the resize path frees that storage via
md_bitmap_file_unmap(). quiesce() does not stop the md thread,
allowing concurrent access to freed pages.
Fix by holding mddev->bitmap_info.mutex during the bitmap update.