CVE-2024-43859

Source
https://cve.org/CVERecord?id=CVE-2024-43859
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-43859.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-43859
Downstream
Related
Published
2024-08-17T09:24:28.672Z
Modified
2026-03-20T12:38:51.900771Z
Summary
f2fs: fix to truncate preallocated blocks in f2fs_file_open()
Details

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

f2fs: fix to truncate preallocated blocks in f2fsfileopen()

chenyuwen reports a f2fs bug as below:

Unable to handle kernel NULL pointer dereference at virtual address 0000000000000011 fscryptsetbiocryptctx+0x78/0x1e8 f2fsgrabreadbio+0x78/0x208 f2fssubmitpageread+0x44/0x154 f2fsgetreaddatapage+0x288/0x5f4 f2fsgetlockdatapage+0x60/0x190 truncatepartialdatapage+0x108/0x4fc f2fsdotruncateblocks+0x344/0x5f0 f2fstruncateblocks+0x6c/0x134 f2fstruncate+0xd8/0x200 f2fsiget+0x20c/0x5ac dogarbagecollect+0x5d0/0xf6c f2fsgc+0x22c/0x6a4 f2fsdisablecheckpoint+0xc8/0x310 f2fsfillsuper+0x14bc/0x1764 mountbdev+0x1b4/0x21c f2fsmount+0x20/0x30 legacygettree+0x50/0xbc vfsgettree+0x5c/0x1b0 donewmount+0x298/0x4cc pathmount+0x33c/0x5fc _arm64sysmount+0xcc/0x15c invokesyscall+0x60/0x150 el0svccommon+0xb8/0xf8 doel0svc+0x28/0xa0 el0svc+0x24/0x84 el0t64synchandler+0x88/0xec

It is because inode.icryptinfo is not initialized during below path: - mount - f2fsfillsuper - f2fsdisablecheckpoint - f2fsgc - f2fsiget - f2fs_truncate

So, let's relocate truncation of preallocated blocks to f2fsfileopen(), after fscryptfileopen().

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/43xxx/CVE-2024-43859.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d4dd19ec1ea0cf6532d65709325c42b1398614a8
Fixed
5f04969136db674f133781626e0b692c5f2bf2f0
Fixed
f44a25a8bfe0c15d33244539696cd9119cf44d18
Fixed
3ba0ae885215b325605ff7ebf6de12ac2adf204d
Fixed
298b1e4182d657c3e388adcc29477904e9600ed5

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-43859.json"