# CVE-2024-26685: nilfs2: fix potential bug in end_buffer_async_write

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `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.25%, higher than 17% of CVEs (2026-12-01)
- Published: 2024-04-03T14:54:47.688Z
- Modified: 2026-06-17T07:18:05.510Z
- Weaknesses: CWE-787
- 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 potential bug in end_buffer_async_write

According to a syzbot report, end_buffer_async_write(), which handles the
completion of block device writes, may detect abnormal condition of the
buffer async_write flag and cause a BUG_ON failure when using nilfs2.

Nilfs2 itself does not use end_buffer_async_write().  But, the async_write
flag is now used as a marker by commit 7f42ec394156 ("nilfs2: fix issue
with race condition of competition between segments for dirty blocks") as
a means of resolving double list insertion of dirty blocks in
nilfs_lookup_dirty_data_buffers() and nilfs_lookup_node_buffers() and the
resulting crash.

This modification is safe as long as it is used for file data and b-tree
node blocks where the page caches are independent.  However, it was
irrelevant and redundant to also introduce async_write for segment summary
and super root blocks that share buffers with the backing device.  This
led to the possibility that the BUG_ON check in end_buffer_async_write
would fail as described above, if independent writebacks of the backing
device occurred in parallel.

The use of async_write for segment summary buffers has already been
removed in a previous change.

Fix this issue by removing the manipulation of the async_write flag for
the remaining super root block buffer.

(As written by CVE List.)

## Affected

- Linux Linux: from 7f42ec3941560f0902fe3671e36f2c20ffd3af0a before c4a09fdac625e64abe478dcf88bfa20406616928; from 7f42ec3941560f0902fe3671e36f2c20ffd3af0a before d31c8721e816eff5ca6573cc487754f357c093cd; from 7f42ec3941560f0902fe3671e36f2c20ffd3af0a before f3e4963566f58726d3265a727116a42b591f6596; from 7f42ec3941560f0902fe3671e36f2c20ffd3af0a before 8fa90634ec3e9cc50f42dd605eec60f2d146ced8; from 7f42ec3941560f0902fe3671e36f2c20ffd3af0a before 6589f0f72f8edd1fa11adce4eedbd3615f2e78ab; from 7f42ec3941560f0902fe3671e36f2c20ffd3af0a before 2c3bdba00283a6c7a5b19481a59a730f46063803; from 7f42ec3941560f0902fe3671e36f2c20ffd3af0a before 626daab3811b772086aef1bf8eed3ffe6f523eff; from 7f42ec3941560f0902fe3671e36f2c20ffd3af0a before 5bc09b397cbf1221f8a8aacb1152650c9195b02b; ccebcc74c81d8399c7b204aea47c1f33b09c2b17; 831c87640d23ccb253a02e4901bd9a325b5e8c2d; d8974c7fe717ee8fb0706e35cc92e0bcdf660ec5; 8f67918af09fc0ffd426a9b6f87697976d3fbc7b; and 5 more (not affected: before 3.12; 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.2.52 before 3.3; from 3.4.83 before 3.5; from 3.10.16 before 3.11; from 3.11.5 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/c4a09fdac625e64abe478dcf88bfa20406616928> (patch)
- <https://git.kernel.org/stable/c/d31c8721e816eff5ca6573cc487754f357c093cd> (patch)
- <https://git.kernel.org/stable/c/f3e4963566f58726d3265a727116a42b591f6596> (patch)
- <https://git.kernel.org/stable/c/8fa90634ec3e9cc50f42dd605eec60f2d146ced8> (patch)
- <https://git.kernel.org/stable/c/6589f0f72f8edd1fa11adce4eedbd3615f2e78ab> (patch)
- <https://git.kernel.org/stable/c/2c3bdba00283a6c7a5b19481a59a730f46063803> (patch)
- <https://git.kernel.org/stable/c/626daab3811b772086aef1bf8eed3ffe6f523eff> (patch)
- <https://git.kernel.org/stable/c/5bc09b397cbf1221f8a8aacb1152650c9195b02b> (patch)
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html> (mailing-list, third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html> (mailing-list, third-party-advisory)

## Sources

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

---

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