CVE-2023-53537

Source
https://cve.org/CVERecord?id=CVE-2023-53537
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53537.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2023-53537
Downstream
Published
2025-10-04T15:16:48.006Z
Modified
2026-04-02T09:44:24.839951Z
Summary
f2fs: fix to avoid use-after-free for cached IPU bio
Details

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:folioendwriteback+0x8a/0x90 Call Trace: endpagewriteback+0x1c/0x60 f2fswriteendio+0x199/0x420 bioendio+0x104/0x180 submitbionoacct+0xa5/0x510 submitbio+0x48/0x80 f2fssubmitwritebio+0x35/0x300 f2fssubmitmergedipuwrite+0x2a0/0x2b0 f2fswritesingledatapage+0x838/0x8b0 f2fswritecachepages+0x379/0xa30 f2fswritedatapages+0x30c/0x340 do_writepages+0xd8/0x1b0 __writebacksingleinode+0x44/0x370 writebacksbinodes+0x233/0x4d0 _writebackinodeswb+0x56/0xf0 wbwriteback+0x1dd/0x2d0 wbworkfn+0x367/0x4a0 processonework+0x21d/0x430 workerthread+0x4e/0x3c0 kthread+0x103/0x130 retfromfork+0x2c/0x50

The root cause is: after cperror is set, f2fssubmitmergedipuwrite() in f2fswritesingledatapage() tries to flush IPU bio in cache, however f2fssubmitmergedipu_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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53537.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0b20fcec8651569935a10afe03fedc0b812d044e
Fixed
b2f423fda64fb49213aa0ed5056079cf295a5df2
Fixed
9a7f63283af6befc0f91d549f4f6917dff7479a9
Fixed
7d058f0ab161437369ad6e45a4b67c2886e71373
Fixed
97ec6f1788cc6bee3f8c89cb908e1a2a1cd859bb
Fixed
af4ce124d7bd74cb839bbdaccffbb416771a56b5
Fixed
5cdb422c839134273866208dad5360835ddb9794

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53537.json"