LiveActive security incident?Get immediate response
CVE Record

CVE-2025-40008: kmsan: fix out-of-bounds access to shadow memory

In the Linux kernel, the following vulnerability has been resolved: kmsan: fix out-of-bounds access to shadow memory Running sha224_kunit on a KMSAN-enabled kernel results in a crash in kmsan_internal_set_shadow_origin(): BUG: unable to handle page fault for address: ffffbc3840291000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 1810067 P4D 1810067 PUD 192d067 PMD 3c17067 PTE 0 Oops: 0000 [#1] SMP NOPTI CPU: 0 UID: 0 PID: 81 Comm: kunit_try_catch Tainted: G N 6.17.0-rc3 #10 PREEMPT(voluntary) Tainted: [N]=TEST Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.17.0-0-gb52ca86e094d-prebuilt.qemu.org 04/01/2014 RIP: 0010:kmsan_internal_set_shadow_origin+0x91/0x100 [...] Call Trace: <TASK> __msan_memset+0xee/0x1a0 sha224_final+0x9e/0x350 test_hash_buffer_overruns+0x46f/0x5f0 ? kmsan_get_shadow_origin_ptr+0x46/0xa0 ? __pfx_test_hash_buffer_overruns+0x10/0x10 kunit_try_run_case+0x198/0xa00 This occurs when memset() is called on a buffer that is not 4-byte aligned and extends to the end of a guard page, i.e. the next page is unmapped. The bug is that the loop at the end of kmsan_internal_set_shadow_origin() accesses the wrong shadow memory bytes when the address is not 4-byte aligned. Since each 4 bytes are associated with an origin, it rounds the address and size so that it can access all the origins that contain the buffer. However, when it checks the corresponding shadow bytes for a particular origin, it incorrectly uses the original unrounded shadow address. This results in reads from shadow memory beyond the end of the buffer's shadow memory, which crashes when that memory is not mapped. To fix this, correctly align the shadow address before accessing the 4 shadow bytes corresponding to each origin.

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysislow

Security readout for executives and security teams

Plain-English summary

This is a Linux kernel bug in KMSAN, a memory-sanitizer/debug facility. A specially shaped unaligned buffer operation can make KMSAN read shadow memory past a mapped boundary and crash. The source describes a test/debug kernel crash, not a normal remote compromise path.

Executive priority

Treat this as a low business-urgency kernel maintenance issue unless your organization depends on KMSAN-enabled test infrastructure. Patch through normal kernel update channels, with faster handling for CI, fuzzing, or research systems where crashes can disrupt security testing.

Technical view

kmsan_internal_set_shadow_origin() used the original unrounded shadow address when checking origin-associated shadow bytes. For unaligned memset() ranges ending at an unmapped guard page, that caused out-of-bounds shadow memory reads and a kernel page fault. The fix aligns the shadow address before accessing the four shadow bytes for each origin.

Likely exposure

Exposure appears concentrated in Linux kernels built with KMSAN enabled, especially test, fuzzing, or sanitizer environments. The source lists affected Linux versions including 6.10, 6.1.155, 6.6.109, 6.12.50, 6.16.10, and 6.17, but distribution backports require vendor verification.

Exploitation context

The bundle reports no CVSS score, no CWE, and KEV is false. It documents a crash triggered during sha224_kunit on a KMSAN-enabled kernel. No cited source claims active exploitation, public weaponization, or remote attackability.

Researcher notes

The evidence points to an instrumentation-layer correctness bug, not a broadly exploitable memory corruption primitive. The root cause is shadow/origin alignment mismatch near guard-page boundaries. Source evidence is incomplete on exploitability, so avoid assuming impact beyond KMSAN-enabled kernel crashes.

Mitigation direction

  • Inventory Linux systems using KMSAN-enabled kernels.
  • Prioritize updates for sanitizer, fuzzing, CI, and kernel test hosts.
  • Apply vendor kernel updates containing the referenced stable fixes.
  • Check distribution advisories if kernel versions are backported or customized.
  • Avoid using KMSAN test kernels for production workloads.

Validation and detection

  • Confirm whether CONFIG_KMSAN is enabled in running kernel builds.
  • Compare kernel versions against the affected and fixed version data.
  • Verify the relevant stable commit is present in your kernel tree.
  • Run KMSAN/KUnit regression testing after applying the fix.
  • Monitor for recurring KMSAN page faults in test logs.
Prepared
Confidence
medium
Sources
7

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-40008 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
6Source 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
LinuxLinux9ff078f5bad8990091f1639347de5e02636e9536, 19e85d939001946671643f4c16e1de8c633a6ce0, 2ef3cec44c60ae171b287db7fc2aa341586d65ba, 2ef3cec44c60ae171b287db7fc2aa341586d65ba, 2ef3cec44c60ae171b287db7fc2aa341586d65ba, abeede7011da6c88e83ed260b909c140b8c9c250, 6.1.94, 6.6.34, 6.9.5unaffected
LinuxLinux6.10, 0, 6.1.155, 6.6.109, 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.