# CVE-2023-52770: f2fs: split initial and dynamic conditions for extent\_cache

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 16, 2026-11-28)
- **CWE:** CWE-476
- **Published:** 2024-05-21T15:30:52.970Z
- **Modified:** 2026-10-30T13:17:16.793Z

## Who should check

- Anyone running Linux \>= 4377b1d3b19e1369d094a94596211a9815ddbb04, \< ff9bc1161cd0209d6f5bee8128a1f078576eea42; \>= 72840cccc0a1a0a0dc1bb27b669a9111be6d0f6a, \< 9de787139b0258a5dd1f498780c26d76b61d2958; \>= 72840cccc0a1a0a0dc1bb27b669a9111be6d0f6a, \< d83309e7e006cee8afca83523559017c824fbf7a; \>= 72840cccc0a1a0a0dc1bb27b669a9111be6d0f6a, \< f803982190f0265fd36cf84670aa6daefc2b0768; \>= 6.1.29, \< 6.1.191
- Anyone running Linux 6.2

## Description

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

f2fs: split initial and dynamic conditions for extent\_cache

Let's allocate the extent\_cache tree without dynamic conditions to avoid a
missing condition causing a panic as below.

 \# create a file w/ a compressed flag
 \# disable the compression
 \# panic while updating extent\_cache

F2FS-fs (dm-64): Swapfile: last extent is not aligned to section
F2FS-fs (dm-64): Swapfile (3) is not align to section: 1) creat(), 2) ioctl(F2FS\_IOC\_SET\_PIN\_FILE), 3) fallocate(2097152 \* N)
Adding 124996k swap on ./swap-file.  Priority:0 extents:2 across:17179494468k
==================================================================
BUG: KASAN: null-ptr-deref in instrument\_atomic\_read\_write out/common/include/linux/instrumented.h:101 \[inline\]
BUG: KASAN: null-ptr-deref in atomic\_try\_cmpxchg\_acquire out/common/include/asm-generic/atomic-instrumented.h:705 \[inline\]
BUG: KASAN: null-ptr-deref in queued\_write\_lock out/common/include/asm-generic/qrwlock.h:92 \[inline\]
BUG: KASAN: null-ptr-deref in \_\_raw\_write\_lock out/common/include/linux/rwlock\_api\_smp.h:211 \[inline\]
BUG: KASAN: null-ptr-deref in \_raw\_write\_lock+0x5a/0x110 out/common/kernel/locking/spinlock.c:295
Write of size 4 at addr 0000000000000030 by task syz-executor154/3327

CPU: 0 PID: 3327 Comm: syz-executor154 Tainted: G           O      5.10.185 \#1
Hardware name: emulation qemu-x86/qemu-x86, BIOS 2023.01-21885-gb3cc1cd24d 01/01/2023
Call Trace:
 \_\_dump\_stack out/common/lib/dump\_stack.c:77 \[inline\]
 dump\_stack\_lvl+0x17e/0x1c4 out/common/lib/dump\_stack.c:118
 \_\_kasan\_report+0x16c/0x260 out/common/mm/kasan/report.c:415
 kasan\_report+0x51/0x70 out/common/mm/kasan/report.c:428
 kasan\_check\_range+0x2f3/0x340 out/common/mm/kasan/generic.c:186
 \_\_kasan\_check\_write+0x14/0x20 out/common/mm/kasan/shadow.c:37
 instrument\_atomic\_read\_write out/common/include/linux/instrumented.h:101 \[inline\]
 atomic\_try\_cmpxchg\_acquire out/common/include/asm-generic/atomic-instrumented.h:705 \[inline\]
 queued\_write\_lock out/common/include/asm-generic/qrwlock.h:92 \[inline\]
 \_\_raw\_write\_lock out/common/include/linux/rwlock\_api\_smp.h:211 \[inline\]
 \_raw\_write\_lock+0x5a/0x110 out/common/kernel/locking/spinlock.c:295
 \_\_drop\_extent\_tree+0xdf/0x2f0 out/common/fs/f2fs/extent\_cache.c:1155
 f2fs\_drop\_extent\_tree+0x17/0x30 out/common/fs/f2fs/extent\_cache.c:1172
 f2fs\_insert\_range out/common/fs/f2fs/file.c:1600 \[inline\]
 f2fs\_fallocate+0x19fd/0x1f40 out/common/fs/f2fs/file.c:1764
 vfs\_fallocate+0x514/0x9b0 out/common/fs/open.c:310
 ksys\_fallocate out/common/fs/open.c:333 \[inline\]
 \_\_do\_sys\_fallocate out/common/fs/open.c:341 \[inline\]
 \_\_se\_sys\_fallocate out/common/fs/open.c:339 \[inline\]
 \_\_x64\_sys\_fallocate+0xb8/0x100 out/common/fs/open.c:339
 do\_syscall\_64+0x35/0x50 out/common/arch/x86/entry/common.c:46

## Affected and fixed versions

- Linux: \>= 4377b1d3b19e1369d094a94596211a9815ddbb04, \< ff9bc1161cd0209d6f5bee8128a1f078576eea42; \>= 72840cccc0a1a0a0dc1bb27b669a9111be6d0f6a, \< 9de787139b0258a5dd1f498780c26d76b61d2958; \>= 72840cccc0a1a0a0dc1bb27b669a9111be6d0f6a, \< d83309e7e006cee8afca83523559017c824fbf7a; \>= 72840cccc0a1a0a0dc1bb27b669a9111be6d0f6a, \< f803982190f0265fd36cf84670aa6daefc2b0768; \>= 6.1.29, \< 6.1.191 (cvelist)
- Linux: 6.2 (cvelist)

## Mitigation

- Upgrade Linux to 6.1.191 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-52770. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-52770.md
Affected: Linux >= 4377b1d3b19e1369d094a94596211a9815ddbb04, < ff9bc1161cd0209d6f5bee8128a1f078576eea42; >= 72840cccc0a1a0a0dc1bb27b669a9111be6d0f6a, < 9de787139b0258a5dd1f498780c26d76b61d2958; >= 72840cccc0a1a0a0dc1bb27b669a9111be6d0f6a, < d83309e7e006cee8afca83523559017c824fbf7a; >= 72840cccc0a1a0a0dc1bb27…
Fixed in: Linux 9de787139b0258a5dd1f498780c26d76b61d2958, Linux 6.1.191

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-52770 being exploited?

There is no confirmed exploitation: CVE-2023-52770 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2023-52770?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-52770?

Linux \>= 4377b1d3b19e1369d094a94596211a9815ddbb04, \< ff9bc1161cd0209d6f5bee8128a1f078576eea42; \>= 72840cccc0a1a0a0dc1bb27b669a9111be6d0f6a, \< 9de787139b0258a5dd1f498780c26d76b61d2958; \>= 72840cccc0a1a0a0dc1bb27b669a9111be6d0f6a, \< d83309e7e006cee8afca83523559017c824fbf7a; \>= 72840cccc0a1a0a0dc1bb27b669a9111be6d0f6a, \< f803982190f0265fd36cf84670aa6daefc2b0768; \>= 6.1.29, \< 6.1.191; Linux 6.2.

### Is there a fix for CVE-2023-52770?

Yes. Fixed in Linux 9de787139b0258a5dd1f498780c26d76b61d2958, Linux 6.1.191. Upgrade Linux to 6.1.191 or later.

### How do I check if I'm affected by CVE-2023-52770?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/9de787139b0258a5dd1f498780c26d76b61d2958>
- patch: <https://git.kernel.org/stable/c/d83309e7e006cee8afca83523559017c824fbf7a>
- patch: <https://git.kernel.org/stable/c/f803982190f0265fd36cf84670aa6daefc2b0768>
- other: <https://git.kernel.org/stable/c/ff9bc1161cd0209d6f5bee8128a1f078576eea42>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-52770>

HTML: <https://flawdb.com/CVE-2023-52770> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-52770>
