nilfs2: protect access to buffers with no active references
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8c26c4e2694a163d525976e804d81cd955bbb40c · < 4b08d23d7d1917bef4fbee8ad81372f49b006656| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: protect access to buffers with no active references
nilfs_lookup_dirty_data_buffers(), which iterates through the buffers attached to dirty data folios/pages, accesses the attached buffers without locking the folios/pages.
For data cache, nilfs_clear_folio_dirty() may be called asynchronously when the file system degenerates to read only, so nilfs_lookup_dirty_data_buffers() still has the potential to cause use after free issues when buffers lose the protection of their dirty state midway due to this asynchronous clearing and are unintentionally freed by try_to_free_buffers().
Eliminate this race issue by adjusting the lock section in this function.
From the CVE record · Linux
A race in nilfs2 can cause a use-after-free when dirty data buffers are accessed without locking their folios or pages. It can occur if the file system becomes read-only and asynchronously clears the buffers’ dirty state. The input does not specify how an attacker could trigger the race or whether authentication or user interaction is required.
Engineers running Linux kernels with nilfs2 should check their versions; affected versions are not specified.