Skip to contentSkip to conversation

CVE-2023-53301: f2fs: fix kernel crash due to null io->bio

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 16, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

f2fs: fix kernel crash due to null io->bio

We should return when io->bio is null before doing anything. Otherwise, panic.

BUG: kernel NULL pointer dereference, address: 0000000000000010
RIP: 0010:__submit_merged_write_cond+0x164/0x240 [f2fs]
Call Trace:
 <TASK>
 f2fs_submit_merged_write+0x1d/0x30 [f2fs]
 commit_checkpoint+0x110/0x1e0 [f2fs]
 f2fs_write_checkpoint+0x9f7/0xf00 [f2fs]
 ? __pfx_issue_checkpoint_thread+0x10/0x10 [f2fs]
 __checkpoint_and_complete_reqs+0x84/0x190 [f2fs]
 ? preempt_count_add+0x82/0xc0
 ? __pfx_issue_checkpoint_thread+0x10/0x10 [f2fs]
 issue_checkpoint_thread+0x4c/0xf0 [f2fs]
 ? __pfx_autoremove_wake_function+0x10/0x10
 kthread+0xff/0x130
 ? __pfx_kthread+0x10/0x10
 ret_from_fork+0x2c/0x50
 </TASK>

The Linux kernel CVE team has assigned CVE-2023-53301 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.18 with commit 64bf0eef0171912f7c2f3ea30ee6ad7a2ad0a511 and fixed in 6.1.16 with commit 83dbb9a1bd5ef2eea73275906fc50b2fdda39cd5
	Issue introduced in 5.18 with commit 64bf0eef0171912f7c2f3ea30ee6ad7a2ad0a511 and fixed in 6.2.3 with commit eb52f13c6093ac761dbeaa459c810fc0253209fc
	Issue introduced in 5.18 with commit 64bf0eef0171912f7c2f3ea30ee6ad7a2ad0a511 and fixed in 6.3 with commit 267c159f9c7bcb7009dae16889b880c5ed8759a8

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2023-53301

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:

	fs/f2fs/data.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/83dbb9a1bd5ef2eea73275906fc50b2fdda39cd5
	https://git.kernel.org/stable/c/eb52f13c6093ac761dbeaa459c810fc0253209fc
	https://git.kernel.org/stable/c/267c159f9c7bcb7009dae16889b880c5ed8759a8