CVE-2023-52770
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
21/05/2024
Last modified:
06/01/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
f2fs: split initial and dynamic conditions for extent_cache<br />
<br />
Let&#39;s allocate the extent_cache tree without dynamic conditions to avoid a<br />
missing condition causing a panic as below.<br />
<br />
# create a file w/ a compressed flag<br />
# disable the compression<br />
# panic while updating extent_cache<br />
<br />
F2FS-fs (dm-64): Swapfile: last extent is not aligned to section<br />
F2FS-fs (dm-64): Swapfile (3) is not align to section: 1) creat(), 2) ioctl(F2FS_IOC_SET_PIN_FILE), 3) fallocate(2097152 * N)<br />
Adding 124996k swap on ./swap-file. Priority:0 extents:2 across:17179494468k<br />
==================================================================<br />
BUG: KASAN: null-ptr-deref in instrument_atomic_read_write out/common/include/linux/instrumented.h:101 [inline]<br />
BUG: KASAN: null-ptr-deref in atomic_try_cmpxchg_acquire out/common/include/asm-generic/atomic-instrumented.h:705 [inline]<br />
BUG: KASAN: null-ptr-deref in queued_write_lock out/common/include/asm-generic/qrwlock.h:92 [inline]<br />
BUG: KASAN: null-ptr-deref in __raw_write_lock out/common/include/linux/rwlock_api_smp.h:211 [inline]<br />
BUG: KASAN: null-ptr-deref in _raw_write_lock+0x5a/0x110 out/common/kernel/locking/spinlock.c:295<br />
Write of size 4 at addr 0000000000000030 by task syz-executor154/3327<br />
<br />
CPU: 0 PID: 3327 Comm: syz-executor154 Tainted: G O 5.10.185 #1<br />
Hardware name: emulation qemu-x86/qemu-x86, BIOS 2023.01-21885-gb3cc1cd24d 01/01/2023<br />
Call Trace:<br />
__dump_stack out/common/lib/dump_stack.c:77 [inline]<br />
dump_stack_lvl+0x17e/0x1c4 out/common/lib/dump_stack.c:118<br />
__kasan_report+0x16c/0x260 out/common/mm/kasan/report.c:415<br />
kasan_report+0x51/0x70 out/common/mm/kasan/report.c:428<br />
kasan_check_range+0x2f3/0x340 out/common/mm/kasan/generic.c:186<br />
__kasan_check_write+0x14/0x20 out/common/mm/kasan/shadow.c:37<br />
instrument_atomic_read_write out/common/include/linux/instrumented.h:101 [inline]<br />
atomic_try_cmpxchg_acquire out/common/include/asm-generic/atomic-instrumented.h:705 [inline]<br />
queued_write_lock out/common/include/asm-generic/qrwlock.h:92 [inline]<br />
__raw_write_lock out/common/include/linux/rwlock_api_smp.h:211 [inline]<br />
_raw_write_lock+0x5a/0x110 out/common/kernel/locking/spinlock.c:295<br />
__drop_extent_tree+0xdf/0x2f0 out/common/fs/f2fs/extent_cache.c:1155<br />
f2fs_drop_extent_tree+0x17/0x30 out/common/fs/f2fs/extent_cache.c:1172<br />
f2fs_insert_range out/common/fs/f2fs/file.c:1600 [inline]<br />
f2fs_fallocate+0x19fd/0x1f40 out/common/fs/f2fs/file.c:1764<br />
vfs_fallocate+0x514/0x9b0 out/common/fs/open.c:310<br />
ksys_fallocate out/common/fs/open.c:333 [inline]<br />
__do_sys_fallocate out/common/fs/open.c:341 [inline]<br />
__se_sys_fallocate out/common/fs/open.c:339 [inline]<br />
__x64_sys_fallocate+0xb8/0x100 out/common/fs/open.c:339<br />
do_syscall_64+0x35/0x50 out/common/arch/x86/entry/common.c:46
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.1.29 (including) | 6.5.13 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6 (including) | 6.6.3 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/9de787139b0258a5dd1f498780c26d76b61d2958
- https://git.kernel.org/stable/c/d83309e7e006cee8afca83523559017c824fbf7a
- https://git.kernel.org/stable/c/f803982190f0265fd36cf84670aa6daefc2b0768
- https://git.kernel.org/stable/c/9de787139b0258a5dd1f498780c26d76b61d2958
- https://git.kernel.org/stable/c/d83309e7e006cee8afca83523559017c824fbf7a
- https://git.kernel.org/stable/c/f803982190f0265fd36cf84670aa6daefc2b0768



