{"api_version":"1","generated_at":"2026-10-23T06:54:38+00:00","cve":"CVE-2025-68356","urls":{"html":"https://cve.report/CVE-2025-68356","api":"https://cve.report/api/cve/CVE-2025-68356.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2025-68356","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2025-68356"},"summary":{"title":"gfs2: Prevent recursive memory reclaim","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ngfs2: Prevent recursive memory reclaim\n\nFunction new_inode() returns a new inode with inode->i_mapping->gfp_mask\nset to GFP_HIGHUSER_MOVABLE.  This value includes the __GFP_FS flag, so\nallocations in that address space can recurse into filesystem memory\nreclaim.  We don't want that to happen because it can consume a\nsignificant amount of stack memory.\n\nWorse than that is that it can also deadlock: for example, in several\nplaces, gfs2_unstuff_dinode() is called inside filesystem transactions.\nThis calls filemap_grab_folio(), which can allocate a new folio, which\ncan trigger memory reclaim.  If memory reclaim recurses into the\nfilesystem and starts another transaction, a deadlock will ensue.\n\nTo fix these kinds of problems, prevent memory reclaim from recursing\ninto filesystem code by making sure that the gfp_mask of inode address\nspaces doesn't include __GFP_FS.\n\nThe \"meta\" and resource group address spaces were already using GFP_NOFS\nas their gfp_mask (which doesn't include __GFP_FS).  The default value\nof GFP_HIGHUSER_MOVABLE is less restrictive than GFP_NOFS, though.  To\navoid being overly limiting, use the default value and only knock off\nthe __GFP_FS flag.  I'm not sure if this will actually make a\ndifference, but it also shouldn't hurt.\n\nThis patch is loosely based on commit ad22c7a043c2 (\"xfs: prevent stack\noverflows from page cache allocation\").\n\nFixes xfstest generic/273.","state":"PUBLISHED","assigner":"Linux","published_at":"2025-12-24 11:15:58","updated_at":"2026-10-21 13:18:22"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/9c0960ed112398bdb6c60ccf6e6b583bc59acede","name":"https://git.kernel.org/stable/c/9c0960ed112398bdb6c60ccf6e6b583bc59acede","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/66eb53cecc5f83183535bbfb2fa6464322049b61","name":"https://git.kernel.org/stable/c/66eb53cecc5f83183535bbfb2fa6464322049b61","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/2c5f4a53476e3cab70adc77b38942c066bd2c17c","name":"https://git.kernel.org/stable/c/2c5f4a53476e3cab70adc77b38942c066bd2c17c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/edb2b255618621dc83d0ec23150e16b2c697077f","name":"https://git.kernel.org/stable/c/edb2b255618621dc83d0ec23150e16b2c697077f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/49e7347f4644d031306d56cb4d51e467cbdcbc69","name":"https://git.kernel.org/stable/c/49e7347f4644d031306d56cb4d51e467cbdcbc69","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-68356","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68356","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected dc0b9435238c1a68150c798c9c7a1b5d7414cbb9 66eb53cecc5f83183535bbfb2fa6464322049b61 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected dc0b9435238c1a68150c798c9c7a1b5d7414cbb9 edb2b255618621dc83d0ec23150e16b2c697077f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected dc0b9435238c1a68150c798c9c7a1b5d7414cbb9 9c0960ed112398bdb6c60ccf6e6b583bc59acede git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected dc0b9435238c1a68150c798c9c7a1b5d7414cbb9 49e7347f4644d031306d56cb4d51e467cbdcbc69 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected dc0b9435238c1a68150c798c9c7a1b5d7414cbb9 2c5f4a53476e3cab70adc77b38942c066bd2c17c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.6","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.160 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.63 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.17.13 6.17.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.2 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.19 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/gfs2/glock.c","fs/gfs2/inode.c","fs/gfs2/inode.h","fs/gfs2/ops_fstype.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"66eb53cecc5f83183535bbfb2fa6464322049b61","status":"affected","version":"dc0b9435238c1a68150c798c9c7a1b5d7414cbb9","versionType":"git"},{"lessThan":"edb2b255618621dc83d0ec23150e16b2c697077f","status":"affected","version":"dc0b9435238c1a68150c798c9c7a1b5d7414cbb9","versionType":"git"},{"lessThan":"9c0960ed112398bdb6c60ccf6e6b583bc59acede","status":"affected","version":"dc0b9435238c1a68150c798c9c7a1b5d7414cbb9","versionType":"git"},{"lessThan":"49e7347f4644d031306d56cb4d51e467cbdcbc69","status":"affected","version":"dc0b9435238c1a68150c798c9c7a1b5d7414cbb9","versionType":"git"},{"lessThan":"2c5f4a53476e3cab70adc77b38942c066bd2c17c","status":"affected","version":"dc0b9435238c1a68150c798c9c7a1b5d7414cbb9","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["fs/gfs2/glock.c","fs/gfs2/inode.c","fs/gfs2/inode.h","fs/gfs2/ops_fstype.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.6"},{"lessThan":"6.6","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.160","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.63","versionType":"semver"},{"lessThanOrEqual":"6.17.*","status":"unaffected","version":"6.17.13","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.2","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"6.19","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.160","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.63","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.17.13","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.2","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.19","versionStartIncluding":"6.6","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ngfs2: Prevent recursive memory reclaim\n\nFunction new_inode() returns a new inode with inode->i_mapping->gfp_mask\nset to GFP_HIGHUSER_MOVABLE.  This value includes the __GFP_FS flag, so\nallocations in that address space can recurse into filesystem memory\nreclaim.  We don't want that to happen because it can consume a\nsignificant amount of stack memory.\n\nWorse than that is that it can also deadlock: for example, in several\nplaces, gfs2_unstuff_dinode() is called inside filesystem transactions.\nThis calls filemap_grab_folio(), which can allocate a new folio, which\ncan trigger memory reclaim.  If memory reclaim recurses into the\nfilesystem and starts another transaction, a deadlock will ensue.\n\nTo fix these kinds of problems, prevent memory reclaim from recursing\ninto filesystem code by making sure that the gfp_mask of inode address\nspaces doesn't include __GFP_FS.\n\nThe \"meta\" and resource group address spaces were already using GFP_NOFS\nas their gfp_mask (which doesn't include __GFP_FS).  The default value\nof GFP_HIGHUSER_MOVABLE is less restrictive than GFP_NOFS, though.  To\navoid being overly limiting, use the default value and only knock off\nthe __GFP_FS flag.  I'm not sure if this will actually make a\ndifference, but it also shouldn't hurt.\n\nThis patch is loosely based on commit ad22c7a043c2 (\"xfs: prevent stack\noverflows from page cache allocation\").\n\nFixes xfstest generic/273."}],"providerMetadata":{"dateUpdated":"2026-10-21T12:38:16.003Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/66eb53cecc5f83183535bbfb2fa6464322049b61"},{"url":"https://git.kernel.org/stable/c/edb2b255618621dc83d0ec23150e16b2c697077f"},{"url":"https://git.kernel.org/stable/c/9c0960ed112398bdb6c60ccf6e6b583bc59acede"},{"url":"https://git.kernel.org/stable/c/49e7347f4644d031306d56cb4d51e467cbdcbc69"},{"url":"https://git.kernel.org/stable/c/2c5f4a53476e3cab70adc77b38942c066bd2c17c"}],"title":"gfs2: Prevent recursive memory reclaim","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2025-68356","datePublished":"2025-12-24T10:32:46.275Z","dateReserved":"2025-12-16T14:48:05.301Z","dateUpdated":"2026-10-21T12:38:16.003Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2025-12-24 11:15:58","lastModifiedDate":"2026-10-21 13:18:22","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2025","CveId":"68356","Ordinal":"1","Title":"gfs2: Prevent recursive memory reclaim","CVE":"CVE-2025-68356","Year":"2025"},"notes":[{"CveYear":"2025","CveId":"68356","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\ngfs2: Prevent recursive memory reclaim\n\nFunction new_inode() returns a new inode with inode->i_mapping->gfp_mask\nset to GFP_HIGHUSER_MOVABLE.  This value includes the __GFP_FS flag, so\nallocations in that address space can recurse into filesystem memory\nreclaim.  We don't want that to happen because it can consume a\nsignificant amount of stack memory.\n\nWorse than that is that it can also deadlock: for example, in several\nplaces, gfs2_unstuff_dinode() is called inside filesystem transactions.\nThis calls filemap_grab_folio(), which can allocate a new folio, which\ncan trigger memory reclaim.  If memory reclaim recurses into the\nfilesystem and starts another transaction, a deadlock will ensue.\n\nTo fix these kinds of problems, prevent memory reclaim from recursing\ninto filesystem code by making sure that the gfp_mask of inode address\nspaces doesn't include __GFP_FS.\n\nThe \"meta\" and resource group address spaces were already using GFP_NOFS\nas their gfp_mask (which doesn't include __GFP_FS).  The default value\nof GFP_HIGHUSER_MOVABLE is less restrictive than GFP_NOFS, though.  To\navoid being overly limiting, use the default value and only knock off\nthe __GFP_FS flag.  I'm not sure if this will actually make a\ndifference, but it also shouldn't hurt.\n\nThis patch is loosely based on commit ad22c7a043c2 (\"xfs: prevent stack\noverflows from page cache allocation\").\n\nFixes xfstest generic/273.","Type":"Description","Title":"gfs2: Prevent recursive memory reclaim"}]}}}