# CVE-2024-26696: nilfs2: fix hang in nilfs_lookup_dirty_data_buffers()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 9% of CVEs (2026-12-01)
- Published: 2024-04-03T14:54:56.926Z
- Modified: 2026-06-17T07:18:07.193Z
- Weaknesses: CWE-667
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 1d1d1a767206fbe5d4c69493b7e6d2a8d08cc0a0 before 228742b2ddfb99dfd71e5a307e6088ab6836272e; from 1d1d1a767206fbe5d4c69493b7e6d2a8d08cc0a0 before 862ee4422c38be5c249844a684b00d0dbe9d1e46; from 1d1d1a767206fbe5d4c69493b7e6d2a8d08cc0a0 before 98a4026b22ff440c7f47056481bcbbe442f607d6; from 1d1d1a767206fbe5d4c69493b7e6d2a8d08cc0a0 before 7e9b622bd0748cc104d66535b76d9b3535f9dc0f; from 1d1d1a767206fbe5d4c69493b7e6d2a8d08cc0a0 before 8494ba2c9ea00a54d5b50e69b22c55a8958bce32; from 1d1d1a767206fbe5d4c69493b7e6d2a8d08cc0a0 before ea5ddbc11613b55e5128c85f57b08f907abd9b28; from 1d1d1a767206fbe5d4c69493b7e6d2a8d08cc0a0 before e38585401d464578d30f5868ff4ca54475c34f7d; from 1d1d1a767206fbe5d4c69493b7e6d2a8d08cc0a0 before 38296afe3c6ee07319e01bb249aa4bb47c07b534; 3.9 (not affected: before 3.9; from 4.19.307 up to 4.19.*; from 5.4.269 up to 5.4.*; from 5.10.210 up to 5.10.*; from 5.15.149 up to 5.15.*; from 6.1.79 up to 6.1.*; from 6.6.18 up to 6.6.*; from 6.7.6 up to 6.7.*; from 6.8 up to *)
- linux linux_kernel: from 3.9 before 4.19.307; from 4.20 before 5.4.269; from 5.5 before 5.10.210; from 5.11 before 5.15.149; from 5.16 before 6.1.79; from 6.2 before 6.6.18; from 6.7 before 6.7.6; 6.8
- debian debian_linux: 10.0

## References

- <https://git.kernel.org/stable/c/228742b2ddfb99dfd71e5a307e6088ab6836272e> (patch)
- <https://git.kernel.org/stable/c/862ee4422c38be5c249844a684b00d0dbe9d1e46> (patch)
- <https://git.kernel.org/stable/c/98a4026b22ff440c7f47056481bcbbe442f607d6> (patch)
- <https://git.kernel.org/stable/c/7e9b622bd0748cc104d66535b76d9b3535f9dc0f> (patch)
- <https://git.kernel.org/stable/c/8494ba2c9ea00a54d5b50e69b22c55a8958bce32> (patch)
- <https://git.kernel.org/stable/c/ea5ddbc11613b55e5128c85f57b08f907abd9b28> (patch)
- <https://git.kernel.org/stable/c/e38585401d464578d30f5868ff4ca54475c34f7d> (patch)
- <https://git.kernel.org/stable/c/38296afe3c6ee07319e01bb249aa4bb47c07b534> (patch)
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html> (mailing-list)
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html> (mailing-list)

## Sources

- CVE List: [CVE-2024-26696](https://www.cve.org/CVERecord?id=CVE-2024-26696), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-26696](https://nvd.nist.gov/vuln/detail/CVE-2024-26696), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-26696 · Whole record: https://cve.day/CVE-2024-26696.json · Rebuilt by cve.day 2026-11-25T22:58:38.518Z
