# CVE-2023-53537: f2fs: fix to avoid use-after-free for cached IPU bio

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2025-10-04T15:16:48.006Z
- Modified: 2026-08-05T09:14:41.501Z
- Weaknesses: CWE-416
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

f2fs: fix to avoid use-after-free for cached IPU bio

xfstest generic/019 reports a bug:

kernel BUG at mm/filemap.c:1619!
RIP: 0010:folio_end_writeback+0x8a/0x90
Call Trace:
 end_page_writeback+0x1c/0x60
 f2fs_write_end_io+0x199/0x420
 bio_endio+0x104/0x180
 submit_bio_noacct+0xa5/0x510
 submit_bio+0x48/0x80
 f2fs_submit_write_bio+0x35/0x300
 f2fs_submit_merged_ipu_write+0x2a0/0x2b0
 f2fs_write_single_data_page+0x838/0x8b0
 f2fs_write_cache_pages+0x379/0xa30
 f2fs_write_data_pages+0x30c/0x340
 do_writepages+0xd8/0x1b0
 __writeback_single_inode+0x44/0x370
 writeback_sb_inodes+0x233/0x4d0
 __writeback_inodes_wb+0x56/0xf0
 wb_writeback+0x1dd/0x2d0
 wb_workfn+0x367/0x4a0
 process_one_work+0x21d/0x430
 worker_thread+0x4e/0x3c0
 kthread+0x103/0x130
 ret_from_fork+0x2c/0x50

The root cause is: after cp_error is set, f2fs_submit_merged_ipu_write()
in f2fs_write_single_data_page() tries to flush IPU bio in cache, however
f2fs_submit_merged_ipu_write() missed to check validity of @bio parameter,
result in submitting random cached bio which belong to other IO context,
then it will cause use-after-free issue, fix it by adding additional
validity check.

(As written by CVE List.)

## Affected

- Linux Linux: from 0b20fcec8651569935a10afe03fedc0b812d044e before b2f423fda64fb49213aa0ed5056079cf295a5df2; from 0b20fcec8651569935a10afe03fedc0b812d044e before 9a7f63283af6befc0f91d549f4f6917dff7479a9; from 0b20fcec8651569935a10afe03fedc0b812d044e before 7d058f0ab161437369ad6e45a4b67c2886e71373; from 0b20fcec8651569935a10afe03fedc0b812d044e before 97ec6f1788cc6bee3f8c89cb908e1a2a1cd859bb; from 0b20fcec8651569935a10afe03fedc0b812d044e before af4ce124d7bd74cb839bbdaccffbb416771a56b5; from 0b20fcec8651569935a10afe03fedc0b812d044e before 5cdb422c839134273866208dad5360835ddb9794; 5.5 (not affected: before 5.5; from 5.10.180 up to 5.10.*; from 5.15.111 up to 5.15.*; from 6.1.28 up to 6.1.*; from 6.2.15 up to 6.2.*; from 6.3.2 up to 6.3.*; from 6.4 up to *)
- linux linux_kernel: from 5.5 before 5.10.180; from 5.11 before 5.15.111; from 5.16 before 6.1.28; from 6.2 before 6.2.15; from 6.3 before 6.3.2

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/b2f423fda64fb49213aa0ed5056079cf295a5df2> (patch)
- <https://git.kernel.org/stable/c/9a7f63283af6befc0f91d549f4f6917dff7479a9> (patch)
- <https://git.kernel.org/stable/c/7d058f0ab161437369ad6e45a4b67c2886e71373> (patch)
- <https://git.kernel.org/stable/c/97ec6f1788cc6bee3f8c89cb908e1a2a1cd859bb> (patch)
- <https://git.kernel.org/stable/c/af4ce124d7bd74cb839bbdaccffbb416771a56b5> (patch)
- <https://git.kernel.org/stable/c/5cdb422c839134273866208dad5360835ddb9794> (patch)

## Sources

- CVE List: [CVE-2023-53537](https://www.cve.org/CVERecord?id=CVE-2023-53537), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2023-53537](https://nvd.nist.gov/vuln/detail/CVE-2023-53537), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2023-53537 · Whole record: https://cve.day/CVE-2023-53537.json · Rebuilt by cve.day 2026-11-25T22:58:34.930Z
