Skip to contentSkip to conversation

CVE-2023-53763: Revert "f2fs: fix to do sanity check on extent cache correctly"

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Dec 8, 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:

Revert "f2fs: fix to do sanity check on extent cache correctly"

syzbot reports a f2fs bug as below:

UBSAN: array-index-out-of-bounds in fs/f2fs/f2fs.h:3275:19
index 1409 is out of range for type '__le32[923]' (aka 'unsigned int[923]')
Call Trace:
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:217 [inline]
 __ubsan_handle_out_of_bounds+0x11c/0x150 lib/ubsan.c:348
 inline_data_addr fs/f2fs/f2fs.h:3275 [inline]
 __recover_inline_status fs/f2fs/inode.c:113 [inline]
 do_read_inode fs/f2fs/inode.c:480 [inline]
 f2fs_iget+0x4730/0x48b0 fs/f2fs/inode.c:604
 f2fs_fill_super+0x640e/0x80c0 fs/f2fs/super.c:4601
 mount_bdev+0x276/0x3b0 fs/super.c:1391
 legacy_get_tree+0xef/0x190 fs/fs_context.c:611
 vfs_get_tree+0x8c/0x270 fs/super.c:1519
 do_new_mount+0x28f/0xae0 fs/namespace.c:3335
 do_mount fs/namespace.c:3675 [inline]
 __do_sys_mount fs/namespace.c:3884 [inline]
 __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3861
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

The issue was bisected to:

commit d48a7b3a72f121655d95b5157c32c7d555e44c05

Author: Chao Yu <[email protected]>
Date:   Mon Jan 9 03:49:20 2023 +0000

f2fs: fix to do sanity check on extent cache correctly

The root cause is we applied both v1 and v2 of the patch, v2 is the right fix, so it needs to revert v1 in order to fix reported issue.

v1:
commit d48a7b3a72f1 ("f2fs: fix to do sanity check on extent cache correctly")
https://lore.kernel.org/lkml/[email protected]/

v2:
commit 269d11948100 ("f2fs: fix to do sanity check on extent cache correctly")
https://lore.kernel.org/lkml/[email protected]/

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

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

	Issue introduced in 6.1.29 with commit 85eb8b61dd4cfc7a839a0e86287b92ca6193444e and fixed in 6.1.53 with commit 0d545a8e77cbd1fbad311b18952e38e0f7672ab4
	Issue introduced in 6.3 with commit d48a7b3a72f121655d95b5157c32c7d555e44c05 and fixed in 6.4.16 with commit ea35767edc78327c686e21fe1231b668f11be0db
	Issue introduced in 6.3 with commit d48a7b3a72f121655d95b5157c32c7d555e44c05 and fixed in 6.5.3 with commit bbb3cd66301ef752fae2922452660f228d69bcaf
	Issue introduced in 6.3 with commit d48a7b3a72f121655d95b5157c32c7d555e44c05 and fixed in 6.6 with commit 958ccbbf1ce716d77c7cfa79ace50a421c1eed73
	Issue introduced in 6.2.5 with commit a3d1fd01250ffca88c11e9bd8d19be779acc7557

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-53763

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/inode.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/0d545a8e77cbd1fbad311b18952e38e0f7672ab4
	https://git.kernel.org/stable/c/ea35767edc78327c686e21fe1231b668f11be0db
	https://git.kernel.org/stable/c/bbb3cd66301ef752fae2922452660f228d69bcaf
	https://git.kernel.org/stable/c/958ccbbf1ce716d77c7cfa79ace50a421c1eed73