Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2024-47689— f2fs: fix to don't set SB_RDONLY in f2fs_handle_critical_error()

AI Predicted 3.7 Difficulty: Moderate EPSS 0.62% · P47

Affected Version Matrix 12

VendorProductVersion RangeStatus
LinuxLinuxb62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5< 649ec8b30df113042588bd3d3cd4e98bcb1091e0affected
b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5< de43021c72993877a8f86f9fddfa0687609da5a4affected
b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5< 1f63f405c1a1a64b9c310388aad7055fb86b245caffected
b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5< 930c6ab93492c4b15436524e704950b364b2930caffected
ed1d478bf838820201f3fb67a1748fdf15954ea4affected
6.4.4< 6.5affected
6.5affected
< 6.5unaffected
… +4 more rows
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2024-47689

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
f2fs: fix to don't set SB_RDONLY in f2fs_handle_critical_error()
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: f2fs: fix to don't set SB_RDONLY in f2fs_handle_critical_error() syzbot reports a f2fs bug as below: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 58 at kernel/rcu/sync.c:177 rcu_sync_dtor+0xcd/0x180 kernel/rcu/sync.c:177 CPU: 1 UID: 0 PID: 58 Comm: kworker/1:2 Not tainted 6.10.0-syzkaller-12562-g1722389b0d86 #0 Workqueue: events destroy_super_work RIP: 0010:rcu_sync_dtor+0xcd/0x180 kernel/rcu/sync.c:177 Call Trace: percpu_free_rwsem+0x41/0x80 kernel/locking/percpu-rwsem.c:42 destroy_super_work+0xec/0x130 fs/super.c:282 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd40 kernel/workqueue.c:3390 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 As Christian Brauner pointed out [1]: the root cause is f2fs sets SB_RDONLY flag in internal function, rather than setting the flag covered w/ sb->s_umount semaphore via remount procedure, then below race condition causes this bug: - freeze_super() - sb_wait_write(sb, SB_FREEZE_WRITE) - sb_wait_write(sb, SB_FREEZE_PAGEFAULT) - sb_wait_write(sb, SB_FREEZE_FS) - f2fs_handle_critical_error - sb->s_flags |= SB_RDONLY - thaw_super - thaw_super_locked - sb_rdonly() is true, so it skips sb_freeze_unlock(sb, SB_FREEZE_FS) - deactivate_locked_super Since f2fs has almost the same logic as ext4 [2] when handling critical error in filesystem if it mounts w/ errors=remount-ro option: - set CP_ERROR_FLAG flag which indicates filesystem is stopped - record errors to superblock - set SB_RDONLY falg Once we set CP_ERROR_FLAG flag, all writable interfaces can detect the flag and stop any further updates on filesystem. So, it is safe to not set SB_RDONLY flag, let's remove the logic and keep in line w/ ext4 [3]. [1] https://lore.kernel.org/all/20240729-himbeeren-funknetz-96e62f9c7aee@brauner [2] https://lore.kernel.org/all/20240729132721.hxih6ehigadqf7wx@quack3 [3] https://lore.kernel.org/linux-ext4/20240805201241.27286-1-jack@suse.cz
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于f2fs文件系统中对SB_RDONLY标志的错误设置。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
LinuxLinux b62e71be2110d8b52bf5faf3c3ed7ca1a0c113a5 ~ 649ec8b30df113042588bd3d3cd4e98bcb1091e0 -
LinuxLinux 6.5 -

II. Public POCs for CVE-2024-47689

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-47689

登录查看更多情报信息。

Same Patch Batch · Linux · 2024-10-21 · 372 CVEs total

CVE-2024-500439.8 CRITICALnfsd: fix possible badness in FREE_STATEID
CVE-2022-489859.8 CRITICALnet: mana: Fix race on per-CQ variable napi work_done
CVE-2024-476959.8 CRITICALRDMA/rtrs-clt: Reset cid to con_num - 1 to stay in bounds
CVE-2024-500339.8 CRITICALslip: make slhc_remember() more robust against malicious packets
CVE-2024-498559.8 CRITICALnbd: fix race between timeout and normal completion
CVE-2024-500479.8 CRITICALsmb: client: fix UAF in async decryption
CVE-2022-490039.8 CRITICALnvme: fix SRCU protection of nvme_ns_head list
CVE-2024-500469.8 CRITICALNFSv4: Prevent NULL-pointer dereference in nfs42_complete_copies()
CVE-2024-499969.4 CRITICALcifs: Fix buffer overflow when parsing NFS reparse points
CVE-2024-476789.4 CRITICALicmp: change the order of rate limits
CVE-2022-490178.8 HIGHtipc: re-fetch skb cb after tipc_msg_validate
CVE-2024-500298.8 HIGHBluetooth: hci_conn: Fix UAF in hci_enhanced_setup_sync
CVE-2024-500418.8 HIGHi40e: Fix macvlan leak by synchronizing access to mac_filter_hash
CVE-2024-499398.8 HIGHwifi: rtw89: avoid to add interface to list twice when SER
CVE-2022-489608.8 HIGHnet: hisilicon: Fix potential use-after-free in hix5hd2_rx()
CVE-2022-489628.8 HIGHnet: hisilicon: Fix potential use-after-free in hisi_femac_rx()
CVE-2022-489648.8 HIGHravb: Fix potential use-after-free in ravb_rx_gbeth()
CVE-2022-490158.8 HIGHnet: hsr: Fix potential use-after-free
CVE-2022-489678.8 HIGHNFC: nci: Bounds check struct nfc_target arrays
CVE-2024-499308.8 HIGHwifi: ath11k: fix array out-of-bound access in SoC stats

Showing top 20 of 372 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2024-47689

No comments yet


Leave a comment