GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2025-40009 (GCVE-0-2025-40009)

Vulnerability from cvelistv5 – Published: 2025-10-20 15:26 – Updated: 2026-05-11 21:40
VLAI
Title
fs/proc/task_mmu: check p->vec_buf for NULL
Summary
In the Linux kernel, the following vulnerability has been resolved: fs/proc/task_mmu: check p->vec_buf for NULL When the PAGEMAP_SCAN ioctl is invoked with vec_len = 0 reaches pagemap_scan_backout_range(), kernel panics with null-ptr-deref: [ 44.936808] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN NOPTI [ 44.937797] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] [ 44.938391] CPU: 1 UID: 0 PID: 2480 Comm: reproducer Not tainted 6.17.0-rc6 #22 PREEMPT(none) [ 44.939062] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 44.939935] RIP: 0010:pagemap_scan_thp_entry.isra.0+0x741/0xa80 <snip registers, unreliable trace> [ 44.946828] Call Trace: [ 44.947030] <TASK> [ 44.949219] pagemap_scan_pmd_entry+0xec/0xfa0 [ 44.952593] walk_pmd_range.isra.0+0x302/0x910 [ 44.954069] walk_pud_range.isra.0+0x419/0x790 [ 44.954427] walk_p4d_range+0x41e/0x620 [ 44.954743] walk_pgd_range+0x31e/0x630 [ 44.955057] __walk_page_range+0x160/0x670 [ 44.956883] walk_page_range_mm+0x408/0x980 [ 44.958677] walk_page_range+0x66/0x90 [ 44.958984] do_pagemap_scan+0x28d/0x9c0 [ 44.961833] do_pagemap_cmd+0x59/0x80 [ 44.962484] __x64_sys_ioctl+0x18d/0x210 [ 44.962804] do_syscall_64+0x5b/0x290 [ 44.963111] entry_SYSCALL_64_after_hwframe+0x76/0x7e vec_len = 0 in pagemap_scan_init_bounce_buffer() means no buffers are allocated and p->vec_buf remains set to NULL. This breaks an assumption made later in pagemap_scan_backout_range(), that page_region is always allocated for p->vec_buf_index. Fix it by explicitly checking p->vec_buf for NULL before dereferencing. Other sites that might run into same deref-issue are already (directly or transitively) protected by checking p->vec_buf. Note: From PAGEMAP_SCAN man page, it seems vec_len = 0 is valid when no output is requested and it's only the side effects caller is interested in, hence it passes check in pagemap_scan_get_args(). This issue was found by syzkaller.
Severity
No CVSS data available.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 52526ca7fdb905a768a93f8faa418e9b988fc34b , < ca988dcdc6683ecd9de5f525ce469588a9141c21 (git)
Affected: 52526ca7fdb905a768a93f8faa418e9b988fc34b , < a2cb8818a3d915cd33a1e8b2babc1bb0c34862c3 (git)
Affected: 52526ca7fdb905a768a93f8faa418e9b988fc34b , < 28aa29986dde79e8466bc87569141291053833f5 (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.7
Unaffected: 0 , < 6.7 (semver)
Unaffected: 6.12.50 , ≤ 6.12.* (semver)
Unaffected: 6.16.10 , ≤ 6.16.* (semver)
Unaffected: 6.17 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/proc/task_mmu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "ca988dcdc6683ecd9de5f525ce469588a9141c21",
              "status": "affected",
              "version": "52526ca7fdb905a768a93f8faa418e9b988fc34b",
              "versionType": "git"
            },
            {
              "lessThan": "a2cb8818a3d915cd33a1e8b2babc1bb0c34862c3",
              "status": "affected",
              "version": "52526ca7fdb905a768a93f8faa418e9b988fc34b",
              "versionType": "git"
            },
            {
              "lessThan": "28aa29986dde79e8466bc87569141291053833f5",
              "status": "affected",
              "version": "52526ca7fdb905a768a93f8faa418e9b988fc34b",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/proc/task_mmu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.7"
            },
            {
              "lessThan": "6.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.50",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.16.*",
              "status": "unaffected",
              "version": "6.16.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.17",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.50",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16.10",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nfs/proc/task_mmu: check p-\u003evec_buf for NULL\n\nWhen the PAGEMAP_SCAN ioctl is invoked with vec_len = 0 reaches\npagemap_scan_backout_range(), kernel panics with null-ptr-deref:\n\n[   44.936808] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN NOPTI\n[   44.937797] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]\n[   44.938391] CPU: 1 UID: 0 PID: 2480 Comm: reproducer Not tainted 6.17.0-rc6 #22 PREEMPT(none)\n[   44.939062] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014\n[   44.939935] RIP: 0010:pagemap_scan_thp_entry.isra.0+0x741/0xa80\n\n\u003csnip registers, unreliable trace\u003e\n\n[   44.946828] Call Trace:\n[   44.947030]  \u003cTASK\u003e\n[   44.949219]  pagemap_scan_pmd_entry+0xec/0xfa0\n[   44.952593]  walk_pmd_range.isra.0+0x302/0x910\n[   44.954069]  walk_pud_range.isra.0+0x419/0x790\n[   44.954427]  walk_p4d_range+0x41e/0x620\n[   44.954743]  walk_pgd_range+0x31e/0x630\n[   44.955057]  __walk_page_range+0x160/0x670\n[   44.956883]  walk_page_range_mm+0x408/0x980\n[   44.958677]  walk_page_range+0x66/0x90\n[   44.958984]  do_pagemap_scan+0x28d/0x9c0\n[   44.961833]  do_pagemap_cmd+0x59/0x80\n[   44.962484]  __x64_sys_ioctl+0x18d/0x210\n[   44.962804]  do_syscall_64+0x5b/0x290\n[   44.963111]  entry_SYSCALL_64_after_hwframe+0x76/0x7e\n\nvec_len = 0 in pagemap_scan_init_bounce_buffer() means no buffers are\nallocated and p-\u003evec_buf remains set to NULL.\n\nThis breaks an assumption made later in pagemap_scan_backout_range(), that\npage_region is always allocated for p-\u003evec_buf_index.\n\nFix it by explicitly checking p-\u003evec_buf for NULL before dereferencing.\n\nOther sites that might run into same deref-issue are already (directly or\ntransitively) protected by checking p-\u003evec_buf.\n\nNote:\nFrom PAGEMAP_SCAN man page, it seems vec_len = 0 is valid when no output\nis requested and it\u0027s only the side effects caller is interested in,\nhence it passes check in pagemap_scan_get_args().\n\nThis issue was found by syzkaller."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-11T21:40:42.885Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/ca988dcdc6683ecd9de5f525ce469588a9141c21"
        },
        {
          "url": "https://git.kernel.org/stable/c/a2cb8818a3d915cd33a1e8b2babc1bb0c34862c3"
        },
        {
          "url": "https://git.kernel.org/stable/c/28aa29986dde79e8466bc87569141291053833f5"
        }
      ],
      "title": "fs/proc/task_mmu: check p-\u003evec_buf for NULL",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40009",
    "datePublished": "2025-10-20T15:26:55.208Z",
    "dateReserved": "2025-04-16T07:20:57.151Z",
    "dateUpdated": "2026-05-11T21:40:42.885Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-40009",
      "date": "2026-09-15",
      "epss": "0.00227",
      "percentile": "0.13503"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-40009\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-10-20T16:15:37.593\",\"lastModified\":\"2026-06-17T09:21:06.837\",\"vulnStatus\":\"Deferred\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nfs/proc/task_mmu: check p-\u003evec_buf for NULL\\n\\nWhen the PAGEMAP_SCAN ioctl is invoked with vec_len = 0 reaches\\npagemap_scan_backout_range(), kernel panics with null-ptr-deref:\\n\\n[   44.936808] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN NOPTI\\n[   44.937797] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]\\n[   44.938391] CPU: 1 UID: 0 PID: 2480 Comm: reproducer Not tainted 6.17.0-rc6 #22 PREEMPT(none)\\n[   44.939062] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014\\n[   44.939935] RIP: 0010:pagemap_scan_thp_entry.isra.0+0x741/0xa80\\n\\n\u003csnip registers, unreliable trace\u003e\\n\\n[   44.946828] Call Trace:\\n[   44.947030]  \u003cTASK\u003e\\n[   44.949219]  pagemap_scan_pmd_entry+0xec/0xfa0\\n[   44.952593]  walk_pmd_range.isra.0+0x302/0x910\\n[   44.954069]  walk_pud_range.isra.0+0x419/0x790\\n[   44.954427]  walk_p4d_range+0x41e/0x620\\n[   44.954743]  walk_pgd_range+0x31e/0x630\\n[   44.955057]  __walk_page_range+0x160/0x670\\n[   44.956883]  walk_page_range_mm+0x408/0x980\\n[   44.958677]  walk_page_range+0x66/0x90\\n[   44.958984]  do_pagemap_scan+0x28d/0x9c0\\n[   44.961833]  do_pagemap_cmd+0x59/0x80\\n[   44.962484]  __x64_sys_ioctl+0x18d/0x210\\n[   44.962804]  do_syscall_64+0x5b/0x290\\n[   44.963111]  entry_SYSCALL_64_after_hwframe+0x76/0x7e\\n\\nvec_len = 0 in pagemap_scan_init_bounce_buffer() means no buffers are\\nallocated and p-\u003evec_buf remains set to NULL.\\n\\nThis breaks an assumption made later in pagemap_scan_backout_range(), that\\npage_region is always allocated for p-\u003evec_buf_index.\\n\\nFix it by explicitly checking p-\u003evec_buf for NULL before dereferencing.\\n\\nOther sites that might run into same deref-issue are already (directly or\\ntransitively) protected by checking p-\u003evec_buf.\\n\\nNote:\\nFrom PAGEMAP_SCAN man page, it seems vec_len = 0 is valid when no output\\nis requested and it\u0027s only the side effects caller is interested in,\\nhence it passes check in pagemap_scan_get_args().\\n\\nThis issue was found by syzkaller.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"fs/proc/task_mmu.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"52526ca7fdb905a768a93f8faa418e9b988fc34b\",\"lessThan\":\"ca988dcdc6683ecd9de5f525ce469588a9141c21\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"52526ca7fdb905a768a93f8faa418e9b988fc34b\",\"lessThan\":\"a2cb8818a3d915cd33a1e8b2babc1bb0c34862c3\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"52526ca7fdb905a768a93f8faa418e9b988fc34b\",\"lessThan\":\"28aa29986dde79e8466bc87569141291053833f5\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"fs/proc/task_mmu.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.7\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.7\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.50\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.16.10\",\"lessThanOrEqual\":\"6.16.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.17\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/28aa29986dde79e8466bc87569141291053833f5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a2cb8818a3d915cd33a1e8b2babc1bb0c34862c3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ca988dcdc6683ecd9de5f525ce469588a9141c21\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-06-30T01:28:57+00:00",
      "cve": "CVE-2025-40009",
      "id": "CVE-2025-40009",
      "initial_release_date": "2025-10-20T00:00:00+00:00",
      "product_status:known_affected": "90",
      "product_status:known_not_affected": "184",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: fs/proc/task_mmu: check p-\u003evec_buf for NULL",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40009.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-08-28T16:56:25Z",
      "cve": "CVE-2025-40009",
      "id": "CVE-2025-40009",
      "initial_release_date": "2025-10-20T23:27:36Z",
      "product_status:first_fixed": "2",
      "product_status:known_affected": "397",
      "product_status:known_not_affected": "514",
      "product_status:recommended": "154",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-40009",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-40009.json",
      "version": "20"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…