{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-64295",
  "modified": "2026-10-07T14:35:31Z",
  "upstream": [
    "CVE-2026-64295"
  ],
  "published": "2026-07-25T08:51:45Z",
  "summary": "mm: page_ext: add count limit to page_ext_iter_next to prevent invalid PFN access",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm: page_ext: add count limit to page_ext_iter_next to prevent invalid PFN access\n\nThe page_ext iteration API does not validate if the PFN still belongs to a\nvalid section while advancing the iterator.  When dynamically adding\nmemory in the hotplug path, it can lead to a NULL pointer dereference\nduring page_ext_lookup at the boundary of the last valid section when\niterator count equals __pgcount.\n\nThe for_each_page_ext() macro calls page_ext_iter_next() as its loop\nincrement.  for_each_page_ext() does a \"__page_ext =\npage_ext_iter_next(&__iter)\" at the end.  This causes page_ext_iter_next()\nto increment iter->index past __pgcount and call page_ext_lookup(start_pfn\n+ __pgcount).  During memory hotplug (online), the PFN at start_pfn +\n__pgcount may belong to a section that has not yet been initialized,\ncausing page_ext_lookup() to trigger a NULL pointer dereference.\n\n[   14.555124][  T846] Call trace:\n[   14.555125][  T846]  lookup_page_ext+0x6c/0x108 (P)\n[   14.555127][  T846]  page_ext_lookup+0x30/0x3c\n[   14.555129][  T846]  __reset_page_owner+0x11c/0x260\n[   14.571201][  T846]  __free_pages_ok+0x5e8/0x8e0\n[   14.571204][  T846]  __free_pages_core+0x78/0xf0\n[   14.571206][  T846]  generic_online_page+0x14/0x24\n[   14.597782][  T846]  online_pages+0x178/0x30c\n[   14.597784][  T846]  memory_block_change_state+0x284/0x32c\n[   14.597787][  T846]  memory_subsys_online+0x4c/0x64\n[   14.597789][  T846]  device_online+0x88/0xb0\n[   14.597791][  T846]  online_memory_block+0x30/0x40\n[   14.597793][  T846]  walk_memory_blocks+0xac/0xe8\n[   14.597794][  T846]  add_memory_resource+0x280/0x298\n[   14.656161][  T846]  add_memory+0x60/0x98\n\nMove the iteration boundary enforcement inside the iterator functions, so\ncallers cannot inadvertently access beyond the requested range.",
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:13",
        "name": "linux"
      },
      "versions": [
        "1:6.18.29-1+rpt1",
        "1:6.18.33-1+rpt1",
        "1:6.18.34-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-2712",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v6",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v7",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v8",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-2712",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v6",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v7",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v8",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-2712",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v6",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v7",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v8",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.34-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.18.29-1+rpt1": {
            "linux_commit": "66318c5b5cd8145a662303af12ed39ac07eb27cc",
            "upstream_version": "6.18.29",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.39"
          },
          "1:6.18.33-1+rpt1": {
            "linux_commit": "95b85bebbedcaedfa7ca79116ed38b7376fba412",
            "upstream_version": "6.18.33",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.39"
          },
          "1:6.18.34-1+rpt1": {
            "linux_commit": "c8c7494100e99ee05b11aaa4f0588a223a63d1af",
            "upstream_version": "6.18.34",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.39"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-64295"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/8dcaa0f87a88d720d13106f3a306c6b61d189d86"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/377b1cd6bbcf327338cd951cc2fd74bc75540235"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ffd017237cfe99e6e5602ab14179b0e6878a0840"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-17T05:24:08Z"
  }
}
