CVE-2022-49380: f2fs: fix to avoid f2fs_bug_on() in dec_valid_node_count()
In the Linux kernel, the following vulnerability has been resolved:
f2fs: fix to avoid f2fs_bug_on() in dec_valid_node_count()
As Yanming reported in bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=215897
I have encountered a bug in F2FS file system in kernel v5.17.
The kernel should enable CONFIG_KASAN=y and CONFIG_KASAN_INLINE=y. You can
reproduce the bug by running the following commands:
The kernel message is shown below:
kernel BUG at fs/f2fs/f2fs.h:2511!
Call Trace:
f2fs_remove_inode_page+0x2a2/0x830
f2fs_evict_inode+0x9b7/0x1510
evict+0x282/0x4e0
do_unlinkat+0x33a/0x540
__x64_sys_unlinkat+0x8e/0xd0
do_syscall_64+0x3b/0x90
entry_SYSCALL_64_after_hwframe+0x44/0xae
The root cause is: .total_valid_block_count or .total_valid_node_count
could fuzzed to zero, then once dec_valid_node_count() was called, it
will cause BUG_ON(), this patch fixes to print warning info and set
SBI_NEED_FSCK into CP instead of panic.
Security readout for executives and security teams
Plain-English summary
CVE-2022-49380 is a Linux kernel F2FS filesystem bug that can turn corrupted or fuzzed filesystem metadata into a kernel panic. The public record does not provide CVSS scoring or exploitation evidence. Business risk is mainly service interruption where affected kernels mount F2FS volumes or images.
Executive priority
Prioritize in environments using F2FS or handling untrusted storage media. For general servers not using F2FS, track through normal kernel patching. Escalate if affected systems provide critical availability or automatically mount user-supplied media.
Technical view
In F2FS, fuzzed total_valid_block_count or total_valid_node_count values could reach zero. A later dec_valid_node_count() path hit f2fs_bug_on(), causing a BUG/panic during inode removal and eviction. The fix changes the behavior to warn and mark the filesystem as needing fsck instead of panicking.
Likely exposure
Exposure is most plausible on Linux systems with F2FS support that mount F2FS storage, removable media, or filesystem images. The affected version data is incomplete and commit-oriented, so confirm status against vendor kernels and the listed stable fixes.
Exploitation context
The bundle cites a kernel bug report and a KASAN-enabled reproduction context, but gives no evidence of active exploitation. CISA KEV status is false. Treat this as a denial-of-service risk from malformed or corrupted F2FS metadata, not proven remote exploitation.
Researcher notes
The record lacks CVSS, CWE, and clear distribution package mappings. The vulnerable behavior is a panic path in F2FS metadata accounting, fixed by replacing BUG_ON handling with warning and fsck-needed state. Avoid assuming privilege escalation or remote reachability from the supplied evidence.
Mitigation direction
Update to a vendor kernel containing the referenced F2FS stable fix.
Check Linux distribution advisories for exact fixed package versions.
Reduce exposure to untrusted F2FS volumes or filesystem images.
Prefer vendor guidance if backport status is unclear.
Validation and detection
Inventory systems running Linux kernels with F2FS enabled or in use.
Compare kernel package backports against the listed stable commit references.
Review logs for kernel BUG traces in fs/f2fs/f2fs.h or F2FS inode eviction.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2022-49380 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
0CVSS vectors
3Timeline events
0ADP providers
7Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
Feb 26, 2025, 02:11 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.