nilfs2: fix kernel bug due to missing clearing of checked flag
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8c26c4e2694a163d525976e804d81cd955bbb40c · < f2f1fa446676c21edb777e6d2bc4fa8f956fab68| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nilfs2: fix kernel bug due to missing clearing of checked flag
Syzbot reported that in directory operations after nilfs2 detects filesystem corruption and degrades to read-only, __block_write_begin_int(), which is called to prepare block writes, may fail the BUG_ON check for accesses exceeding the folio/page size, triggering a kernel bug.
This was found to be because the "checked" flag of a page/folio was not cleared when it was discarded by nilfs2's own routine, which causes the sanity check of directory entries to be skipped when the directory page/folio is reloaded. So, fix that.
This was necessary when the use of nilfs2's own page discard routine was applied to more than just metadata files.
From the CVE record · Linux
A nilfs2 page or folio can retain its checked flag after being discarded, causing directory-entry validation to be skipped when it is reloaded. If nilfs2 detects filesystem corruption and switches to read-only mode, subsequent directory operations can trigger a kernel bug. The input does not establish how an attacker could reach this condition or whether authentication or user interaction is needed.
Engineers running Linux systems that use nilfs2 should check their kernel versions; affected versions were not provided.