ubifs: ubifs_releasepage: Remove ubifs_assert(0) to valid this process
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.1.186.2.56.3In the Linux kernel, the following vulnerability has been resolved:
ubifs: ubifs_releasepage: Remove ubifs_assert(0) to valid this process
There are two states for ubifs writing pages: 1. Dirty, Private 2. Not Dirty, Not Private
The normal process cannot go to ubifs_releasepage() which means there exists pages being private but not dirty. Reproducer[1] shows that it could occur (which maybe related to [2]) with following process:
PA PB PC lock(page)[PA] ubifs_write_end attach_page_private // set Private __set_page_dirty_nobuffers // set Dirty unlock(page)
write_cache_pages[PA] lock(page) clear_page_dirty_for_io(page) // clear Dirty ubifs_writepage
do_truncation[PB] truncate_setsize i_size_write(inode, newsize) // newsize = 0
i_size = i_size_read(inode) // i_size = 0 end_index = i_size >> PAGE_SHIFT if (page->index > end_index) goto out // jump out: unlock(page) // Private, Not Dirty
From the CVE record · Linux
A UBIFS assertion can fail when concurrent page writeback, truncation, and page invalidation leave a page private but not dirty. A local process that triggers this sequence can cause UBIFS to switch to read-only mode; no network access or separate user interaction is described.
Operators running Linux kernels with UBIFS should check their kernel's status; affected versions are not specified.