# CVE-2024-43859: f2fs: fix to truncate preallocated blocks in f2fs\_file\_open()

> 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-26)
- **CWE:** CWE-476
- **Published:** 2024-08-17T09:24:28.672Z
- **Modified:** 2026-06-17T07:51:51.300Z

## Who should check

- Anyone running Linux \>= d4dd19ec1ea0cf6532d65709325c42b1398614a8, \< 5f04969136db674f133781626e0b692c5f2bf2f0; \>= d4dd19ec1ea0cf6532d65709325c42b1398614a8, \< f44a25a8bfe0c15d33244539696cd9119cf44d18; \>= d4dd19ec1ea0cf6532d65709325c42b1398614a8, \< 3ba0ae885215b325605ff7ebf6de12ac2adf204d; \>= d4dd19ec1ea0cf6532d65709325c42b1398614a8, \< 298b1e4182d657c3e388adcc29477904e9600ed5
- Anyone running Linux 5.17

## Description

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

f2fs: fix to truncate preallocated blocks in f2fs\_file\_open()

chenyuwen reports a f2fs bug as below:

Unable to handle kernel NULL pointer dereference at virtual address 0000000000000011
 fscrypt\_set\_bio\_crypt\_ctx+0x78/0x1e8
 f2fs\_grab\_read\_bio+0x78/0x208
 f2fs\_submit\_page\_read+0x44/0x154
 f2fs\_get\_read\_data\_page+0x288/0x5f4
 f2fs\_get\_lock\_data\_page+0x60/0x190
 truncate\_partial\_data\_page+0x108/0x4fc
 f2fs\_do\_truncate\_blocks+0x344/0x5f0
 f2fs\_truncate\_blocks+0x6c/0x134
 f2fs\_truncate+0xd8/0x200
 f2fs\_iget+0x20c/0x5ac
 do\_garbage\_collect+0x5d0/0xf6c
 f2fs\_gc+0x22c/0x6a4
 f2fs\_disable\_checkpoint+0xc8/0x310
 f2fs\_fill\_super+0x14bc/0x1764
 mount\_bdev+0x1b4/0x21c
 f2fs\_mount+0x20/0x30
 legacy\_get\_tree+0x50/0xbc
 vfs\_get\_tree+0x5c/0x1b0
 do\_new\_mount+0x298/0x4cc
 path\_mount+0x33c/0x5fc
 \_\_arm64\_sys\_mount+0xcc/0x15c
 invoke\_syscall+0x60/0x150
 el0\_svc\_common+0xb8/0xf8
 do\_el0\_svc+0x28/0xa0
 el0\_svc+0x24/0x84
 el0t\_64\_sync\_handler+0x88/0xec

It is because inode.i\_crypt\_info is not initialized during below path:
- mount
 - f2fs\_fill\_super
  - f2fs\_disable\_checkpoint
   - f2fs\_gc
    - f2fs\_iget
     - f2fs\_truncate

So, let's relocate truncation of preallocated blocks to f2fs\_file\_open(),
after fscrypt\_file\_open().

## Affected and fixed versions

- Linux: \>= d4dd19ec1ea0cf6532d65709325c42b1398614a8, \< 5f04969136db674f133781626e0b692c5f2bf2f0; \>= d4dd19ec1ea0cf6532d65709325c42b1398614a8, \< f44a25a8bfe0c15d33244539696cd9119cf44d18; \>= d4dd19ec1ea0cf6532d65709325c42b1398614a8, \< 3ba0ae885215b325605ff7ebf6de12ac2adf204d; \>= d4dd19ec1ea0cf6532d65709325c42b1398614a8, \< 298b1e4182d657c3e388adcc29477904e9600ed5 (cvelist)
- Linux: 5.17 (cvelist)

## Mitigation

- Upgrade Linux to 298b1e4182d657c3e388adcc29477904e9600ed5 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-43859. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-43859.md
Affected: Linux >= d4dd19ec1ea0cf6532d65709325c42b1398614a8, < 5f04969136db674f133781626e0b692c5f2bf2f0; >= d4dd19ec1ea0cf6532d65709325c42b1398614a8, < f44a25a8bfe0c15d33244539696cd9119cf44d18; >= d4dd19ec1ea0cf6532d65709325c42b1398614a8, < 3ba0ae885215b325605ff7ebf6de12ac2adf204d; >= d4dd19ec1ea0cf6532d6570…
Fixed in: Linux 5f04969136db674f133781626e0b692c5f2bf2f0, Linux 3ba0ae885215b325605ff7ebf6de12ac2adf204d, Linux 298b1e4182d657c3e388adcc29477904e9600ed5

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-43859 being exploited?

There is no confirmed exploitation: CVE-2024-43859 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-26).

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

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

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

Linux \>= d4dd19ec1ea0cf6532d65709325c42b1398614a8, \< 5f04969136db674f133781626e0b692c5f2bf2f0; \>= d4dd19ec1ea0cf6532d65709325c42b1398614a8, \< f44a25a8bfe0c15d33244539696cd9119cf44d18; \>= d4dd19ec1ea0cf6532d65709325c42b1398614a8, \< 3ba0ae885215b325605ff7ebf6de12ac2adf204d; \>= d4dd19ec1ea0cf6532d65709325c42b1398614a8, \< 298b1e4182d657c3e388adcc29477904e9600ed5; Linux 5.17.

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

Yes. Fixed in Linux 5f04969136db674f133781626e0b692c5f2bf2f0, Linux 3ba0ae885215b325605ff7ebf6de12ac2adf204d, Linux 298b1e4182d657c3e388adcc29477904e9600ed5. Upgrade Linux to 298b1e4182d657c3e388adcc29477904e9600ed5 or later.

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

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/f44a25a8bfe0c15d33244539696cd9119cf44d18>
- patch: <https://git.kernel.org/stable/c/3ba0ae885215b325605ff7ebf6de12ac2adf204d>
- patch: <https://git.kernel.org/stable/c/298b1e4182d657c3e388adcc29477904e9600ed5>
- other: <https://git.kernel.org/stable/c/5f04969136db674f133781626e0b692c5f2bf2f0>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## 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-43859>

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