Overview
About vulnerability
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: fix hang in nilfs_lookup_dirty_data_buffers()
Syzbot reported a hang issue in migrate_pages_batch() called by mbind() and nilfs_lookup_dirty_data_buffers() called in the log writer of nilfs2.
While migrate_pages_batch() locks a folio and waits for the writeback to complete, the log writer thread that should bring the writeback to completion picks up the folio being written back in nilfs_lookup_dirty_data_buffers() that it calls for subsequent log creation and was trying to lock the folio. Thus causing a deadlock.
In the first place, it is unexpected that folios/pages in the middle of writeback will be updated and become dirty. Nilfs2 adds a checksum to verify the validity of the log being written and uses it for recovery at mount, so data changes during writeback are suppressed. Since this is broken, an unclean shutdown could potentially cause recovery to fail.
Investigation revealed that the root cause is that the wait for writeback completion in nilfs_page_mkwrite() is conditional, and if the backing device does not require stable writes, data may be modified without waiting.
Fix these issues by making nilfs_page_mkwrite() wait for writeback to finish regardless of the stable write requirement of the backing device.
Details
- Affected product:
- AlmaLinux 9.2 ESU , Amazon Linux 2 ELS , CentOS 7 ELS , CentOS 8.4 ELS , CentOS 8.5 ELS , CentOS Stream 8 ELS , CloudLinux 7 ELS , Debian 10 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 @ 5.14.0 (+16 more)
Fixes
KernelCare state
Live-patch status from KernelCare for each operating system.
| Operating system | Status | Covered kernels |
|---|---|---|
| Amazon Linux 2 | Released |
81 kernels
|
| Amazon Linux 2 5.10 | Will Not Fix | — |
| Debian 10 | Will Not Fix | — |
| Debian 10 cloud | Will Not Fix | — |
| Debian 11 | Released |
28 kernels
|
| Debian 11 cloud | Released |
8 kernels
|
| Debian 12 | Planned | — |
| Proxmox VE 6 | Released |
41 kernels
|
| Proxmox VE 7 5.15 | Released |
43 kernels
|
| Ubuntu 18.04 AWS Focal | Released |
56 kernels
|
| Ubuntu 18.04 Azure Focal | Released |
58 kernels
|
| Ubuntu 18.04 HWE Focal | Released |
69 kernels
|
| Ubuntu 18.04 HWE GCP | Released |
15 kernels
|
| Ubuntu 20.04 | Released |
106 kernels
|
| Ubuntu 20.04 AWS | Released |
89 kernels
|
| Ubuntu 20.04 Azure | Released |
80 kernels
|
| Ubuntu 20.04 GCP | Released |
12 kernels
|
| Ubuntu 20.04 HWE AWS | Released |
37 kernels
|
| Ubuntu 20.04 HWE Azure | Released |
21 kernels
|
| Ubuntu 22.04 | Released |
50 kernels
|
| Ubuntu 22.04 AWS | Released |
44 kernels
|
| Ubuntu 22.04 Azure | Released |
41 kernels
|