Skip to contentSkip to conversation

CVE-2026-89837: f2fs: fix dentry folio leak in find_in_level

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 16

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

f2fs: fix dentry folio leak in find_in_level

find_in_level() gets a dentry folio with f2fs_find_data_folio() before calling find_in_block(). If find_in_block() returns an error, the function stores the error in res_folio and breaks out of the loop without dropping the dentry folio.

This leaks the folio reference on the find_in_block() error path. Drop the dentry folio before returning the error to the caller.

The Linux kernel CVE team has assigned CVE-2026-89837 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.11 with commit 7ad08a58bf67594057362e45cbddd3e27e53e557 and fixed in 6.18.51 with commit aefb4b0f465b6f95fe02b52d1822a3fb4a9ae922
	Issue introduced in 5.11 with commit 7ad08a58bf67594057362e45cbddd3e27e53e557 and fixed in 7.2.5 with commit 93a3e6a4c9e726a13a935963e8dc43d181db1527
	Issue introduced in 5.11 with commit 7ad08a58bf67594057362e45cbddd3e27e53e557 and fixed in 7.3-rc1 with commit cca7d3e30bf30333314e31bc70b9a739f1342167

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-89837

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:

	fs/f2fs/dir.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/aefb4b0f465b6f95fe02b52d1822a3fb4a9ae922
	https://git.kernel.org/stable/c/93a3e6a4c9e726a13a935963e8dc43d181db1527
	https://git.kernel.org/stable/c/cca7d3e30bf30333314e31bc70b9a739f1342167