# CVE-2022-49380: f2fs: fix to avoid f2fs\_bug\_on() in dec\_valid\_node\_count()

> 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.29% (percentile 14, 2026-11-28)
- **Published:** 2025-02-26T02:11:18.314Z
- **Modified:** 2026-08-15T13:17:21.003Z

## Who should check

- Anyone running Linux \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< f8b3c3fcf33105bc1ee7788e3b51b0a1ae42ae53; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< 2766ddaf45b69252bb8fe526b5b6e56904a9ae7a; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< bce859358d3d5940aa858e40ceee70ee6e76130e; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< 89d9a48d0cd30429463ea4e37ca83be6773ed5eb; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< ccffa99ae6a1f44797b57444c6a80382a42928fe; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< 4d17e6fe9293d57081ffdc11e1cf313e25e8fd9e
- Anyone running Linux 3.8

## Description

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.

## Affected and fixed versions

- Linux: \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< f8b3c3fcf33105bc1ee7788e3b51b0a1ae42ae53; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< 2766ddaf45b69252bb8fe526b5b6e56904a9ae7a; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< bce859358d3d5940aa858e40ceee70ee6e76130e; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< 89d9a48d0cd30429463ea4e37ca83be6773ed5eb; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< ccffa99ae6a1f44797b57444c6a80382a42928fe; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< 4d17e6fe9293d57081ffdc11e1cf313e25e8fd9e (cvelist)
- Linux: 3.8 (cvelist)

## Mitigation

- Upgrade Linux to 4d17e6fe9293d57081ffdc11e1cf313e25e8fd9e or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-49380. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49380.md
Affected: Linux >= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, < f8b3c3fcf33105bc1ee7788e3b51b0a1ae42ae53; >= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, < 2766ddaf45b69252bb8fe526b5b6e56904a9ae7a; >= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, < bce859358d3d5940aa858e40ceee70ee6e76130e; >= 39a53e0ce0df01b3cf4bb89…
Fixed in: Linux 2766ddaf45b69252bb8fe526b5b6e56904a9ae7a, Linux 89d9a48d0cd30429463ea4e37ca83be6773ed5eb, Linux 4d17e6fe9293d57081ffdc11e1cf313e25e8fd9e

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-2022-49380 being exploited?

There is no confirmed exploitation: CVE-2022-49380 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.29% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2022-49380?

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

### Which versions are affected by CVE-2022-49380?

Linux \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< f8b3c3fcf33105bc1ee7788e3b51b0a1ae42ae53; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< 2766ddaf45b69252bb8fe526b5b6e56904a9ae7a; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< bce859358d3d5940aa858e40ceee70ee6e76130e; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< 89d9a48d0cd30429463ea4e37ca83be6773ed5eb; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< ccffa99ae6a1f44797b57444c6a80382a42928fe; \>= 39a53e0ce0df01b3cf4bb898c7ae2fd2189647d5, \< 4d17e6fe9293d57081ffdc11e1cf313e25e8fd9e; Linux 3.8.

### Is there a fix for CVE-2022-49380?

Yes. Fixed in Linux 2766ddaf45b69252bb8fe526b5b6e56904a9ae7a, Linux 89d9a48d0cd30429463ea4e37ca83be6773ed5eb, Linux 4d17e6fe9293d57081ffdc11e1cf313e25e8fd9e. Upgrade Linux to 4d17e6fe9293d57081ffdc11e1cf313e25e8fd9e or later.

### How do I check if I'm affected by CVE-2022-49380?

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/f8b3c3fcf33105bc1ee7788e3b51b0a1ae42ae53>
- patch: <https://git.kernel.org/stable/c/2766ddaf45b69252bb8fe526b5b6e56904a9ae7a>
- patch: <https://git.kernel.org/stable/c/bce859358d3d5940aa858e40ceee70ee6e76130e>
- patch: <https://git.kernel.org/stable/c/89d9a48d0cd30429463ea4e37ca83be6773ed5eb>
- patch: <https://git.kernel.org/stable/c/ccffa99ae6a1f44797b57444c6a80382a42928fe>
- patch: <https://git.kernel.org/stable/c/4d17e6fe9293d57081ffdc11e1cf313e25e8fd9e>

## 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-2022-49380>

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