{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-46280",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-46280"
  ],
  "published": "2026-06-08T15:40:52Z",
  "summary": "lib: test_hmm: evict device pages on file close to avoid use-after-free",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nlib: test_hmm: evict device pages on file close to avoid use-after-free\n\nPatch series \"Minor hmm_test fixes and cleanups\".\n\nTwo bugfixes a cleanup for the HMM kernel selftests.  These were mostly\nreported by Zenghui Yu with special thanks to Lorenzo for analysing and\npointing out the problems.\n\n\nThis patch (of 3):\n\nWhen dmirror_fops_release() is called it frees the dmirror struct but\ndoesn't migrate device private pages back to system memory first.  This\nleaves those pages with a dangling zone_device_data pointer to the freed\ndmirror.\n\nIf a subsequent fault occurs on those pages (eg.  during coredump) the\ndmirror_devmem_fault() callback dereferences the stale pointer causing a\nkernel panic.  This was reported [1] when running mm/ksft_hmm.sh on arm64,\nwhere a test failure triggered SIGABRT and the resulting coredump walked\nthe VMAs faulting in the stale device private pages.\n\nFix this by calling dmirror_device_evict_chunk() for each devmem chunk in\ndmirror_fops_release() to migrate all device private pages back to system\nmemory before freeing the dmirror struct.  The function is moved earlier\nin the file to avoid a forward declaration.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.176",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-46280"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/234071b4318feaeb27cd2e4e1b16ef6b055adf89"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/bf477abd448c76bb8ea51c9b4f63a3a17c4b6239"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5846715b6382dd4c6a69b35a56ca6115d33bc2a0"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/38f113f81d3f0adc658a4475dd3ecaec985e21d3"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/9de1eb0aac2862d6144b8db0ec1388e79f8bc3e1"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/744dd97752ef1076a8d8672bb0d8aa2c7abc1144"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T13:16:28Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - Exploitation requires local syscalls to open the hmm_dmirror character device, issue HMM_DMIRROR_MIGRATE_TO_DEV ioctl, close the fd, and fault migrated pages; there is no network, adjacent-wireless, or physical-device attack path.\nAC:L - The UAF is deterministically triggered by the attacker's own migrate-then-close-then-fault sequence with no race or external timing dependency; the attacker fully controls both sides of the lifecycle.\nPR:L - The vulnerable ioctl and release paths perform no capability or permission checks beyond opening the local character device; any local user who can access /dev/hmm_dmirrorN can execute the full exploit chain without real root privileges in the init namespace.\nUI:N - No victim interaction is required; the attacker triggers the fault themselves by accessing their own migrated pages or aborting for coredump after closing the device file.\nS:U - Impact is confined to kernel memory corruption and panic within the same kernel security boundary; this is a test-module UAF, not a VM escape, IOMMU bypass, or cross-authority sandbox breakout.\nC:H - The stale dmirror pointer is dereferenced in dmirror_devmem_fault() to read freed kmalloc memory (dmirror->mdevice, dmirror->flags), giving a classic UAF information-disclosure primitive.\nI:H - The fault handler continues to use the freed dmirror for migration and xa_erase on dmirror->pt, enabling heap reuse attacks and arbitrary kernel memory write or code-execution primitives.\nA:H - The bug was reported to cause kernel panic during coredump VMA walks, and any UAF page fault on stale device-private pages can oops or panic the system."
    }
  }
}
