Skip to contentSkip to conversation

CVE-2025-37950: ocfs2: fix panic in failed foilio allocation

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 20, 2025

lore
Share & tools
lore
#0 lore raw

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

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

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

ocfs2: fix panic in failed foilio allocation

commit 7e119cff9d0a ("ocfs2: convert w_pages to w_folios") and commit 9a5e08652dc4b ("ocfs2: use an array of folios instead of an array of pages") save -ENOMEM in the folio array upon allocation failure and call the folio array free code.

The folio array free code expects either valid folio pointers or NULL. Finding the -ENOMEM will result in a panic. Fix by NULLing the error folio entry.

The Linux kernel CVE team has assigned CVE-2025-37950 to this issue.

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

	Issue introduced in 6.14 with commit 7e119cff9d0a21e39e53c7d27addc31f4b8c0000 and fixed in 6.14.7 with commit 80d18f060d5bdf2c5eb3d1d00dcb744d6a879222
	Issue introduced in 6.14 with commit 7e119cff9d0a21e39e53c7d27addc31f4b8c0000 and fixed in 6.15-rc6 with commit 31d4cd4eb2f8d9b87ebfa6a5e443a59e3b3d7b8c

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-2025-37950

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/ocfs2/alloc.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/80d18f060d5bdf2c5eb3d1d00dcb744d6a879222
	https://git.kernel.org/stable/c/31d4cd4eb2f8d9b87ebfa6a5e443a59e3b3d7b8c