# CVE-2022-49425: f2fs: fix dereference of stale list iterator after loop body

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-02-26T02:12:46.702Z
- **Modified:** 2026-08-05T08:55:10.701Z

## Who should check

- Anyone running Linux \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 385edd3ce5b4b1e9d31f474a5e35a39779ec1110; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 5e47a7add3dda7f236548c5ec3017776dc2a729f; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 51d584704d18e60fa473823654f35611c777b291; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 45b2b7d7108ae1e25a5036cab04ab9273e792332; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< b26e1c777890e4b938136deb8ec07a29f33862e4; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< ed7efc472c00986dcd6903ab6ed165c7fa167674; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 2aaf51dd39afb6d01d13f1e6fe20b684733b37d5
- Anyone running Linux 4.12

## Description

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

f2fs: fix dereference of stale list iterator after loop body

The list iterator variable will be a bogus pointer if no break was hit.
Dereferencing it (cur-\>page in this case) could load an out-of-bounds/undefined
value making it unsafe to use that in the comparision to determine if the
specific element was found.

Since 'cur-\>page' \*can\* be out-ouf-bounds it cannot be guaranteed that
by chance (or intention of an attacker) it matches the value of 'page'
even though the correct element was not found.

This is fixed by using a separate list iterator variable for the loop
and only setting the original variable if a suitable element was found.
Then determing if the element was found is simply checking if the
variable is set.

## Affected and fixed versions

- Linux: \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 385edd3ce5b4b1e9d31f474a5e35a39779ec1110; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 5e47a7add3dda7f236548c5ec3017776dc2a729f; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 51d584704d18e60fa473823654f35611c777b291; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 45b2b7d7108ae1e25a5036cab04ab9273e792332; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< b26e1c777890e4b938136deb8ec07a29f33862e4; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< ed7efc472c00986dcd6903ab6ed165c7fa167674; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 2aaf51dd39afb6d01d13f1e6fe20b684733b37d5 (cvelist)
- Linux: 4.12 (cvelist)

## Mitigation

- Upgrade Linux to 2aaf51dd39afb6d01d13f1e6fe20b684733b37d5 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-49425. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49425.md
Affected: Linux >= 8c242db9b8c01b252290e23827163787f07e01d1, < 385edd3ce5b4b1e9d31f474a5e35a39779ec1110; >= 8c242db9b8c01b252290e23827163787f07e01d1, < 5e47a7add3dda7f236548c5ec3017776dc2a729f; >= 8c242db9b8c01b252290e23827163787f07e01d1, < 51d584704d18e60fa473823654f35611c777b291; >= 8c242db9b8c01b252290e23…
Fixed in: Linux 385edd3ce5b4b1e9d31f474a5e35a39779ec1110, Linux 5e47a7add3dda7f236548c5ec3017776dc2a729f, Linux 51d584704d18e60fa473823654f35611c777b291, Linux 45b2b7d7108ae1e25a5036cab04ab9273e792332, Linux 2aaf51dd39afb6d01d13f1e6fe20b684733b37d5

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-49425 being exploited?

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

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

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 385edd3ce5b4b1e9d31f474a5e35a39779ec1110; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 5e47a7add3dda7f236548c5ec3017776dc2a729f; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 51d584704d18e60fa473823654f35611c777b291; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 45b2b7d7108ae1e25a5036cab04ab9273e792332; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< b26e1c777890e4b938136deb8ec07a29f33862e4; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< ed7efc472c00986dcd6903ab6ed165c7fa167674; \>= 8c242db9b8c01b252290e23827163787f07e01d1, \< 2aaf51dd39afb6d01d13f1e6fe20b684733b37d5; Linux 4.12.

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

Yes. Fixed in Linux 385edd3ce5b4b1e9d31f474a5e35a39779ec1110, Linux 5e47a7add3dda7f236548c5ec3017776dc2a729f, Linux 51d584704d18e60fa473823654f35611c777b291, Linux 45b2b7d7108ae1e25a5036cab04ab9273e792332, Linux 2aaf51dd39afb6d01d13f1e6fe20b684733b37d5. Upgrade Linux to 2aaf51dd39afb6d01d13f1e6fe20b684733b37d5 or later.

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

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/385edd3ce5b4b1e9d31f474a5e35a39779ec1110>
- patch: <https://git.kernel.org/stable/c/5e47a7add3dda7f236548c5ec3017776dc2a729f>
- patch: <https://git.kernel.org/stable/c/51d584704d18e60fa473823654f35611c777b291>
- patch: <https://git.kernel.org/stable/c/45b2b7d7108ae1e25a5036cab04ab9273e792332>
- patch: <https://git.kernel.org/stable/c/b26e1c777890e4b938136deb8ec07a29f33862e4>
- patch: <https://git.kernel.org/stable/c/ed7efc472c00986dcd6903ab6ed165c7fa167674>
- patch: <https://git.kernel.org/stable/c/2aaf51dd39afb6d01d13f1e6fe20b684733b37d5>

## 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-49425>

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