CVE-2022-50009 Information
Description
In the Linux kernel the following vulnerability has been resolved:
f2fs: fix null-ptr-deref in f2fs_get_dnode_of_data
There is issue as follows when test f2fs atomic write: F2FS-fs (loop0): Can’t find valid F2FS filesystem in 2th superblock F2FS-fs (loop0): invalid crc_offset: 0 F2FS-fs (loop0): f2fs_check_nid_range: out-of-range nid=1 run fsck to fix. F2FS-fs (loop0): f2fs_check_nid_range: out-of-range nid=2 run fsck to fix.
BUG: KASAN: null-ptr-deref in f2fs_get_dnode_of_data+0xac/0x16d0 Read of size 8 at addr 0000000000000028 by task rep/1990
CPU: 4 PID: 1990 Comm: rep Not tainted 5.19.0-rc6-next-20220715 266
Call Trace:
As 3db1de0e582c commit changed atomic write way which new a cow_inode for atomic write file and also mark cow_inode as FI_ATOMIC_FILE. When f2fs_do_write_data_page write cow_inode will use cow_inode’s cow_inode which is NULL. Then will trigger null-ptr-deref. To solve above issue introduce FI_COW_FILE flag for COW inode.
Fiexes: 3db1de0e582c(2fs: change the current atomic write way)
Reference
https://git.kernel.org/stable/c/0f63e33eca6fa29a11c76fa31db5fe1cada5ad6e https://git.kernel.org/stable/c/4a2c5b7994960fac29cf8a3f4e62855bae1b27d4 https://git.kernel.org/stable/c/7000ad53ec1b17bd2fac76984b7b0c663755cbb7
Related CNNVD
CNNVD-202506-2293 (Published: 2025-06-18)
Share on: