LiveActive security incident?Get immediate response
CVE Record

CVE-2025-40009: fs/proc/task_mmu: check p->vec_buf for NULL

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.

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2025-40009 is a Linux kernel crash bug in the PAGEMAP_SCAN ioctl path. A valid request with vec_len set to zero can leave an internal buffer NULL and later cause a kernel NULL-pointer dereference. The known impact from the source is system crash, not data theft or remote compromise.

Executive priority

Treat this as a stability and availability risk. It is not currently supported as remotely exploitable or actively exploited, but shared Linux infrastructure should be patched on the normal kernel security maintenance cycle.

Technical view

In fs/proc/task_mmu, pagemap_scan_init_bounce_buffer() allocates no output buffer when vec_len is 0, leaving p->vec_buf NULL. Later, pagemap_scan_backout_range() assumes a page_region exists for p->vec_buf_index and dereferences it. The kernel fix adds an explicit NULL check before dereference.

Likely exposure

Exposure appears limited to Linux systems running affected kernel versions where local code can invoke PAGEMAP_SCAN ioctl. The source lists Linux 6.7, 6.12.50, 6.16.10, and 6.17 as affected entries, but version-range detail is incomplete in the bundle.

Exploitation context

The source describes a syzkaller-found reproducer causing a kernel panic. CISA KEV status is false, and the bundle provides no evidence of active exploitation, public weaponization, privilege escalation, or remote attack paths.

Researcher notes

The issue hinges on vec_len=0 being valid when no output is requested. The failure path is a violated allocation assumption, not a described memory corruption primitive. Source evidence supports local denial of service through kernel panic only.

Mitigation direction

  • Review kernel vendor advisories for CVE-2025-40009 and apply the stable fix.
  • Prioritize affected multi-user, container, CI, and shared compute hosts.
  • Track distribution backports rather than relying only on upstream version numbers.
  • If patching is delayed, review local access to proc pagemap interfaces.
  • Monitor for unexpected kernel panics referencing PAGEMAP_SCAN or task_mmu.

Validation and detection

  • Inventory Linux kernel versions across servers, containers hosts, and endpoints.
  • Compare installed kernels against vendor CVE-2025-40009 advisory status.
  • Confirm whether the stable commits are included or backported.
  • Check crash logs for null-ptr-deref traces in pagemap_scan paths.
  • Verify patched systems no longer report the vulnerable kernel build.
Prepared
Confidence
medium
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2025-40009 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Unknown
CVSS
Not scored
Known Exploited
No
Published
Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

0CVSS vectors
3Timeline events
0ADP providers
4Source links

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux52526ca7fdb905a768a93f8faa418e9b988fc34b, 52526ca7fdb905a768a93f8faa418e9b988fc34b, 52526ca7fdb905a768a93f8faa418e9b988fc34bunaffected
LinuxLinux6.7, 0, 6.12.50, 6.16.10, 6.17affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.