# CVE-2024-47689: f2fs: fix to don't set SB\_RDONLY in f2fs\_handle\_critical\_error()

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

- **Severity:** MEDIUM 5.3
- **CVSS:** 5.3 (v3.1, NVD) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; 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:** Remote, login needed
- **EPSS:** 0.77% (percentile 52, 2026-11-26)
- **CWE:** CWE-362
- **Published:** 2024-10-21T11:53:29.185Z
- **Modified:** 2026-06-17T07:57:32.770Z

## Who should check

- Anyone running Linux \>= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, \< 649ec8b30df113042588bd3d3cd4e98bcb1091e0; \>= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, \< de43021c72993877a8f86f9fddfa0687609da5a4; \>= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, \< 1f63f405c1a1a64b9c310388aad7055fb86b245c; \>= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, \< 930c6ab93492c4b15436524e704950b364b2930c; ed1d478bf838820201f3fb67a1748fdf15954ea4; \>= 6.4.4, \< 6.5
- Anyone running Linux 6.5

## Description

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

f2fs: fix to don't set SB\_RDONLY in f2fs\_handle\_critical\_error()

syzbot reports a f2fs bug as below:

------------\[ cut here \]------------
WARNING: CPU: 1 PID: 58 at kernel/rcu/sync.c:177 rcu\_sync\_dtor+0xcd/0x180 kernel/rcu/sync.c:177
CPU: 1 UID: 0 PID: 58 Comm: kworker/1:2 Not tainted 6.10.0-syzkaller-12562-g1722389b0d86 \#0
Workqueue: events destroy\_super\_work
RIP: 0010:rcu\_sync\_dtor+0xcd/0x180 kernel/rcu/sync.c:177
Call Trace:
 percpu\_free\_rwsem+0x41/0x80 kernel/locking/percpu-rwsem.c:42
 destroy\_super\_work+0xec/0x130 fs/super.c:282
 process\_one\_work kernel/workqueue.c:3231 \[inline\]
 process\_scheduled\_works+0xa2c/0x1830 kernel/workqueue.c:3312
 worker\_thread+0x86d/0xd40 kernel/workqueue.c:3390
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret\_from\_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret\_from\_fork\_asm+0x1a/0x30 arch/x86/entry/entry\_64.S:244

As Christian Brauner pointed out \[1\]: the root cause is f2fs sets
SB\_RDONLY flag in internal function, rather than setting the flag
covered w/ sb-\>s\_umount semaphore via remount procedure, then below
race condition causes this bug:

- freeze\_super()
 - sb\_wait\_write(sb, SB\_FREEZE\_WRITE)
 - sb\_wait\_write(sb, SB\_FREEZE\_PAGEFAULT)
 - sb\_wait\_write(sb, SB\_FREEZE\_FS)
					- f2fs\_handle\_critical\_error
					 - sb-\>s\_flags \|= SB\_RDONLY
- thaw\_super
 - thaw\_super\_locked
  - sb\_rdonly() is true, so it skips
    sb\_freeze\_unlock(sb, SB\_FREEZE\_FS)
  - deactivate\_locked\_super

Since f2fs has almost the same logic as ext4 \[2\] when handling critical
error in filesystem if it mounts w/ errors=remount-ro option:
- set CP\_ERROR\_FLAG flag which indicates filesystem is stopped
- record errors to superblock
- set SB\_RDONLY falg
Once we set CP\_ERROR\_FLAG flag, all writable interfaces can detect the
flag and stop any further updates on filesystem. So, it is safe to not
set SB\_RDONLY flag, let's remove the logic and keep in line w/ ext4 \[3\].

\[1\] https://lore.kernel.org/all/20240729-himbeeren-funknetz-96e62f9c7aee@brauner
\[2\] https://lore.kernel.org/all/20240729132721.hxih6ehigadqf7wx@quack3
\[3\] https://lore.kernel.org/linux-ext4/20240805201241.27286-1-jack@suse.cz

## Affected and fixed versions

- Linux: \>= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, \< 649ec8b30df113042588bd3d3cd4e98bcb1091e0; \>= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, \< de43021c72993877a8f86f9fddfa0687609da5a4; \>= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, \< 1f63f405c1a1a64b9c310388aad7055fb86b245c; \>= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, \< 930c6ab93492c4b15436524e704950b364b2930c; ed1d478bf838820201f3fb67a1748fdf15954ea4; \>= 6.4.4, \< 6.5 (cvelist)
- Linux: 6.5 (cvelist)

## Mitigation

- Upgrade Linux to 6.5 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-47689.md
Affected: Linux >= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, < 649ec8b30df113042588bd3d3cd4e98bcb1091e0; >= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, < de43021c72993877a8f86f9fddfa0687609da5a4; >= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, < 1f63f405c1a1a64b9c310388aad7055fb86b245c; >= b62e71be2110d8b52bf5faf…
Fixed in: Linux 649ec8b30df113042588bd3d3cd4e98bcb1091e0, Linux 1f63f405c1a1a64b9c310388aad7055fb86b245c, Linux 930c6ab93492c4b15436524e704950b364b2930c, Linux 6.5

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-2024-47689 being exploited?

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

### How serious is CVE-2024-47689?

Medium: CVSS 5.3 (v3.1, scored by NVD). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2024-47689?

Linux \>= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, \< 649ec8b30df113042588bd3d3cd4e98bcb1091e0; \>= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, \< de43021c72993877a8f86f9fddfa0687609da5a4; \>= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, \< 1f63f405c1a1a64b9c310388aad7055fb86b245c; \>= b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5, \< 930c6ab93492c4b15436524e704950b364b2930c; ed1d478bf838820201f3fb67a1748fdf15954ea4; \>= 6.4.4, \< 6.5; Linux 6.5.

### Is there a fix for CVE-2024-47689?

Yes. Fixed in Linux 649ec8b30df113042588bd3d3cd4e98bcb1091e0, Linux 1f63f405c1a1a64b9c310388aad7055fb86b245c, Linux 930c6ab93492c4b15436524e704950b364b2930c, Linux 6.5. Upgrade Linux to 6.5 or later.

### How do I check if I'm affected by CVE-2024-47689?

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/649ec8b30df113042588bd3d3cd4e98bcb1091e0>
- patch: <https://git.kernel.org/stable/c/de43021c72993877a8f86f9fddfa0687609da5a4>
- patch: <https://git.kernel.org/stable/c/1f63f405c1a1a64b9c310388aad7055fb86b245c>
- patch: <https://git.kernel.org/stable/c/930c6ab93492c4b15436524e704950b364b2930c>

## 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-2024-47689>

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