CVE-2022-49425
published high CVSS 3.1 · 7.8f2fs: fix dereference of stale list iterator after loop body
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux8c242db9b8c01b252290e23827163787f07e01d1 to < 385edd3ce5b4b1e9d31f474a5e35a39779ec1110 · 8c242db9b8c01b252290e23827163787f07e01d1 to < 5e47a7add3dda7f236548c5ec3017776dc2a729f · 8c242db9b8c01b252290e23827163787f07e01d1 to < 51d584704d18e60fa473823654f35611c777b291 · 8c242db9b8c01b252290e23827163787f07e01d1 to < 45b2b7d7108ae1e25a5036cab04ab9273e792332 · 8c242db9b8c01b252290e23827163787f07e01d1 to < b26e1c777890e4b938136deb8ec07a29f33862e4 · 8c242db9b8c01b252290e23827163787f07e01d1 to < ed7efc472c00986dcd6903ab6ed165c7fa167674 · 8c242db9b8c01b252290e23827163787f07e01d1 to < 2aaf51dd39afb6d01d13f1e6fe20b684733b37d5 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux4.12 (affected) · 0 to < 4.12 (unaffected · semver) · 4.19.247 through 4.19.* (unaffected · semver) · 5.4.198 through 5.4.* (unaffected · semver) · 5.10.121 through 5.10.* (unaffected · semver) · 5.15.46 through 5.15.* (unaffected · semver) · 5.17.14 through 5.17.* (unaffected · semver) · 5.18.3 through 5.18.* (unaffected · semver) · 5.19 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - Reachable only via local f2fs atomic-write ioctls and pagecache invalidate/truncate on an f2fs inode (F2FS_IOC_START_ATOMIC_WRITE → dirty → f2fs_invalidate_folio → f2fs_drop_inmem_page); not via network protocol handlers. AC:L - An unprivileged local attacker fully controls the atomic-write, write, and truncate/invalidate sequence on their own file and can drive the drop path directly; no attacker-independent timing or rare hardware state is required. PR:L - F2FS_IOC_START_ATOMIC_WRITE only needs inode_owner_or_capable, so any unprivileged user who owns a file on a mounted f2fs volume (common on Android userdata) can enter the path without real root. UI:N - On typical f2fs deployments the filesystem is already mounted; the attacker triggers the bug with their own ioctl/write/truncate and needs no separate victim action. S:U - Impact is kernel memory corruption within the host f2fs/pagecache authority and does not cross VM, IOMMU, or other security boundaries. C:H - On the not-found path the stale iterator aliases into f2fs_inode_info; continuing to kmem_cache_free that address corrupts slab freelists, which is leveragable for arbitrary kernel read primitives. I:H - list_del on the bogus inmem_pages object and kmem_cache_free of a non-slab inode-interior pointer yield heap corruption exploitable for arbitrary write and control-flow hijacking. A:H - The same path can BUG_ON/WARN then fault in list_del/slab free, or panic from corrupted freelists, so availability impact is a kernel oops/panic.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 8c242db9b8c01b252290e23827163787f07e01d1 to < 385edd3ce5b4b1e9d31f474a5e35a39779ec1110 (affected · git)8c242db9b8c01b252290e23827163787f07e01d1 to < 5e47a7add3dda7f236548c5ec3017776dc2a729f (affected · git)8c242db9b8c01b252290e23827163787f07e01d1 to < 51d584704d18e60fa473823654f35611c777b291 (affected · git)8c242db9b8c01b252290e23827163787f07e01d1 to < 45b2b7d7108ae1e25a5036cab04ab9273e792332 (affected · git)8c242db9b8c01b252290e23827163787f07e01d1 to < b26e1c777890e4b938136deb8ec07a29f33862e4 (affected · git)8c242db9b8c01b252290e23827163787f07e01d1 to < ed7efc472c00986dcd6903ab6ed165c7fa167674 (affected · git)8c242db9b8c01b252290e23827163787f07e01d1 to < 2aaf51dd39afb6d01d13f1e6fe20b684733b37d5 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 4.12 (affected)0 to < 4.12 (unaffected · semver)4.19.247 through 4.19.* (unaffected · semver)5.4.198 through 5.4.* (unaffected · semver)5.10.121 through 5.10.* (unaffected · semver)5.15.46 through 5.15.* (unaffected · semver)5.17.14 through 5.17.* (unaffected · semver)5.18.3 through 5.18.* (unaffected · semver)5.19 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
7- https://git.kernel.org/stable/c/2aaf51dd39afb6d01d13f1e6fe20b684733b37d5
- https://git.kernel.org/stable/c/385edd3ce5b4b1e9d31f474a5e35a39779ec1110
- https://git.kernel.org/stable/c/45b2b7d7108ae1e25a5036cab04ab9273e792332
- https://git.kernel.org/stable/c/51d584704d18e60fa473823654f35611c777b291
- https://git.kernel.org/stable/c/5e47a7add3dda7f236548c5ec3017776dc2a729f
- https://git.kernel.org/stable/c/b26e1c777890e4b938136deb8ec07a29f33862e4
- https://git.kernel.org/stable/c/ed7efc472c00986dcd6903ab6ed165c7fa167674
Provider assertions
1Linux · cna
f2fs: fix dereference of stale list iterator after loop body
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- e18446d58eb7089d32552d81e6d79e520da0d6453cfb9160aa54e4c2394a07b1
- Ingested
- 23 Sep 2026, 08:04:12 UTC
- Source record
- Official CVE record