Bug 2347696 (CVE-2022-49425) - CVE-2022-49425 kernel: f2fs: fix dereference of stale list iterator after loop body
Summary: CVE-2022-49425 kernel: f2fs: fix dereference of stale list iterator after loo...
Keywords:
Status: NEW
Alias: CVE-2022-49425
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-26 03:03 UTC by OSIDB Bzimport
Modified: 2025-02-28 07:25 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-02-26 03:03:33 UTC
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.

Comment 1 Avinash Hanwate 2025-02-26 19:29:33 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022655-CVE-2022-49425-05aa@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.