# CVE-2024-40969: f2fs: don't set RO when shutting down f2fs

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 13% of CVEs (2026-12-01)
- Published: 2024-07-12T12:32:08.139Z
- Modified: 2026-06-17T07:46:59.150Z
- Weaknesses: CWE-667
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

f2fs: don't set RO when shutting down f2fs

Shutdown does not check the error of thaw_super due to readonly, which
causes a deadlock like below.

f2fs_ioc_shutdown(F2FS_GOING_DOWN_FULLSYNC)        issue_discard_thread
 - bdev_freeze
  - freeze_super
 - f2fs_stop_checkpoint()
  - f2fs_handle_critical_error                     - sb_start_write
    - set RO                                         - waiting
 - bdev_thaw
  - thaw_super_locked
    - return -EINVAL, if sb_rdonly()
 - f2fs_stop_discard_thread
  -> wait for kthread_stop(discard_thread);

(As written by CVE List.)

## Affected

- Linux Linux: from 98e4da8ca301e062d79ae168c67e56f3c3de3ce4 before 1036d3ea7a32cb7cee00885c73a1f2ba7fbc499a; from 98e4da8ca301e062d79ae168c67e56f3c3de3ce4 before f47ed3b284b38f235355e281f57dfa8fffcc6563; from 98e4da8ca301e062d79ae168c67e56f3c3de3ce4 before 3bdb7f161697e2d5123b89fe1778ef17a44858e7; 3.8 (not affected: before 3.8; from 6.6.36 up to 6.6.*; from 6.9.7 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: before 6.6.36; from 6.7 before 6.9.7

## References

- <https://git.kernel.org/stable/c/1036d3ea7a32cb7cee00885c73a1f2ba7fbc499a> (patch)
- <https://git.kernel.org/stable/c/f47ed3b284b38f235355e281f57dfa8fffcc6563> (patch)
- <https://git.kernel.org/stable/c/3bdb7f161697e2d5123b89fe1778ef17a44858e7> (patch)

## Sources

- CVE List: [CVE-2024-40969](https://www.cve.org/CVERecord?id=CVE-2024-40969), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-40969](https://nvd.nist.gov/vuln/detail/CVE-2024-40969), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-40969 · Whole record: https://cve.day/CVE-2024-40969.json · Rebuilt by cve.day 2026-11-25T22:58:42.866Z
