Skip to content
Heist/ feed
Back to feed
HighFix available

mm/gup: reject FOLL_SPLIT_PMD with hugetlb VMAs

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: mm/gup: reject FOLL_SPLIT_PMD with hugetlb VMAs Patch series "mm: fixes for device-exclusive entries (hmm)", v2. Discussing the PageTail() call in make_device_exclusive_range() with Willy, I recently discovered [1] that device-exclusive handling does not properly work with THP, making the hmm-tests selftests fail if THPs are enabled on the system. Looking into more details, I found that hugetlb is not properly fenced, and I realized that something that was bugging me for longer -- how device-exclusive entries interact with mapcounts -- completely breaks migration/swapout/split/hwpoison handling of these folios while they have device-exclusive PTEs. The program below can be used to allocate 1 GiB worth of pages and making them device-exclusive on a kernel with CONFIG_TEST_HMM. Once they are device-exclusive, these folios cannot get swapped out (proc$pid/smaps_rollup will always indicate 1 GiB RSS no matter how much one forces memory reclaim), and when having a memory block onlined to ZONE_MOVABLE, trying to offline it will loop forever and complain about failed migration of a page that should be movable. # echo offline > /sys/devices/system/memory/memory136/state # echo online_movable > /sys/devices/system/memory/memory136/state # ./hmm-swap & ... wait until everything is device-exclusive # echo offline > /sys/devices/system/memory/memory136/state [ 285.193431][T14882] page: refcount:2 mapcount:0 mapping:00000

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.23, 6.13.11, 6.14.2
CVEs
CVE-2025-22034
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 04:24 UTC · Revision 1

Source evidence

mm/gup: reject FOLL_SPLIT_PMD with hugetlb VMAs

core-osv · Original source

Published 16 Apr 2025, 14:11 UTC

In the Linux kernel, the following vulnerability has been resolved: mm/gup: reject FOLL_SPLIT_PMD with hugetlb VMAs Patch series "mm: fixes for device-exclusive entries (hmm)", v2. Discussing the PageTail() call in make_device_exclusive_range() with Willy, I recently discovered [1] that device-exclusive handling does not properly work with THP, making the hmm-tests selftests fail if THPs are enabled on the system. Looking into more details, I found that hugetlb is not properly fenced, and I realized that something that was bugging me for longer -- how device-exclusive entries interact with mapcounts -- completely breaks migration/swapout/split/hwpoison handling of these folios while they have device-exclusive PTEs. The program below can be used to allocate 1 GiB worth of pages and making them device-exclusive on a kernel with CONFIG_TEST_HMM. Once they are device-exclusive, these folios cannot get swapped out (proc$pid/smaps_rollup will always indicate 1 GiB RSS no matter how much one forces memory reclaim), and when having a memory block onlined to ZONE_MOVABLE, trying to offline it will loop forever and complain about failed migration of a page that should be movable. # echo offline > /sys/devices/system/memory/memory136/state # echo online_movable > /sys/devices/system/memory/memory136/state # ./hmm-swap & ... wait until everything is device-exclusive # echo offline > /sys/devices/system/memory/memory136/state [ 285.193431][T14882] page: refcount:2 mapcount:0 mapping:00000

osv:CVE-2025-22034

Kernel

Fixed versions: 6.12.23, 6.13.11, 6.14.2

Complete source record
{
  "id": "1977ad4789ca670430526831e4d486277dbd1136c344bf5ffced79d8a7116249",
  "url": "https://osv.dev/vulnerability/CVE-2025-22034",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mm/gup: reject FOLL_SPLIT_PMD with hugetlb VMAs",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: mm/gup: reject FOLL_SPLIT_PMD with hugetlb VMAs Patch series \"mm: fixes for device-exclusive entries (hmm)\", v2. Discussing the PageTail() call in make_device_exclusive_range() with Willy, I recently discovered [1] that device-exclusive handling does not properly work with THP, making the hmm-tests selftests fail if THPs are enabled on the system. Looking into more details, I found that hugetlb is not properly fenced, and I realized that something that was bugging me for longer -- how device-exclusive entries interact with mapcounts -- completely breaks migration/swapout/split/hwpoison handling of these folios while they have device-exclusive PTEs. The program below can be used to allocate 1 GiB worth of pages and making them device-exclusive on a kernel with CONFIG_TEST_HMM. Once they are device-exclusive, these folios cannot get swapped out (proc$pid/smaps_rollup will always indicate 1 GiB RSS no matter how much one forces memory reclaim), and when having a memory block onlined to ZONE_MOVABLE, trying to offline it will loop forever and complain about failed migration of a page that should be movable. # echo offline > /sys/devices/system/memory/memory136/state # echo online_movable > /sys/devices/system/memory/memory136/state # ./hmm-swap & ... wait until everything is device-exclusive # echo offline > /sys/devices/system/memory/memory136/state [ 285.193431][T14882] page: refcount:2 mapcount:0 mapping:00000",
    "evidence": "osv:CVE-2025-22034",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.12.23",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.13.11",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.14.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-22034",
      "aliases": [
        "CVE-2025-22034"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "9cb28da54643ad464c47585cd5866c30b0218e67"
                },
                {
                  "fixed": "2e877ff3492267def06dd50cb165dc9ab8838e7d"
                },
                {
                  "fixed": "48d28417c66cce2f3b0ba773fcb6695a56eff220"
                },
                {
                  "fixed": "fd900832e8440046627b60697687ab5d04398008"
                },
                {
                  "fixed": "8977752c8056a6a094a279004a49722da15bace3"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-22034.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.10.0"
                },
                {
                  "fixed": "6.12.23"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.13.11"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.14.0"
                },
                {
                  "fixed": "6.14.2"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-22034.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:42.667756548Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/2e877ff3492267def06dd50cb165dc9ab8838e7d",
        "https://git.kernel.org/stable/c/48d28417c66cce2f3b0ba773fcb6695a56eff220",
        "https://git.kernel.org/stable/c/8977752c8056a6a094a279004a49722da15bace3",
        "https://git.kernel.org/stable/c/fd900832e8440046627b60697687ab5d04398008",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/22xxx/CVE-2025-22034.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-22034",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/22xxx/CVE-2025-22034.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-22034",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 510238,
  "published_at": "2025-04-16T14:11:53.301+00:00"
}