gfs2: Prevent recursive memory reclaim
Published Dec 24, 2025
7.1
HIGHCVSS 3.1
EPSS 0.21%
Description
Function new_inode() returns a new inode with inode->i_mapping->gfp_mask set to GFP_HIGHUSER_MOVABLE. This value includes the __GFP_FS flag, so allocations in that address space can recurse into filesystem memory reclaim. We don't want that to happen because it can consume a significant amount of stack memory.
Worse than that is that it can also deadlock: for example, in several places, gfs2_unstuff_dinode() is called inside filesystem transactions. This calls filemap_grab_folio(), which can allocate a new folio, which can trigger memory reclaim. If memory reclaim recurses into the filesystem and starts another transaction, a deadlock will ensue.
To fix these kinds of problems, prevent memory reclaim from recursing into filesystem code by making sure that the gfp_mask of inode address spaces doesn't include __GFP_FS.
The "meta" and resource group address spaces were already using GFP_NOFS as their gfp_mask (which doesn't include __GFP_FS). The default value of GFP_HIGHUSER_MOVABLE is less restrictive than GFP_NOFS, though. To avoid being overly limiting, use the default value and only knock off the __GFP_FS flag. I'm not sure if this will actually make a difference, but it also shouldn't hurt.
This patch is loosely based on commit ad22c7a043c2 ("xfs: prevent stack overflows from page cache allocation").
Fixes xfstest generic/273.
Affected products
-
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version
-
- Version 6.6StatusaffectedConstraints-
- Version 0StatusunaffectedConstraints<6.6
- Version 6.12.63StatusunaffectedConstraints<=6.12.*
- Version 6.17.13StatusunaffectedConstraints<=6.17.*
- Version 6.18.2StatusunaffectedConstraints<=6.18.*
- Version 6.19StatusunaffectedConstraints<=*
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
No data.
No data.
Red Hat Enterprise Linux 10
kernel
Not affected
Red Hat Enterprise Linux 6
kernel
Not affected
Red Hat Enterprise Linux 7
kernel
Not affected
Red Hat Enterprise Linux 7
kernel-rt
Not affected
Red Hat Enterprise Linux 8
kernel
Not affected
Red Hat Enterprise Linux 8
kernel-rt
Not affected
Red Hat Enterprise Linux 9
kernel
Not affected
Red Hat Enterprise Linux 9
kernel-rt
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 6 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 9 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Not affected | n/a |
No package ranges for this CVE.
Remediation
No remediation recorded yet.
Metrics
No CVSS v4.0 score for this CVE.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
No CVSS v3.0 score for this CVE.
No CVSS v2.0 score for this CVE.
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2025–2026- EPSS v4
- EPSS v5
Percentile over time
- EPSS v4
- EPSS v5
Table of values (3 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 0.21% (0.00211) | 10.26th | v5 (v2026.06.15) |
| Jun 15, 2026 | 0.18% (0.00176) | 7.29th | v5 (v2026.06.15) |
| Dec 24, 2025 | 0.02% (0.00018) | 3.71th | v4 (v2025.03.14) |
References (9)
- https://access.redhat.com/security/cve/CVE-2025-68356 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2424876 Issue Tracking
- https://git.kernel.org/stable/c/2c5f4a53476e3cab70adc77b38942c066bd2c17c
- https://git.kernel.org/stable/c/49e7347f4644d031306d56cb4d51e467cbdcbc69
- https://git.kernel.org/stable/c/9c0960ed112398bdb6c60ccf6e6b583bc59acede
- https://git.kernel.org/stable/c/edb2b255618621dc83d0ec23150e16b2c697077f
- https://lore.kernel.org/linux-cve-announce/2025122456-CVE-2025-68356-1574@gregkh/T
- https://nvd.nist.gov/vuln/detail/CVE-2025-68356
- https://www.cve.org/CVERecord?id=CVE-2025-68356
Change history (0)
No recorded changes yet.