Vulnerability in Kernel
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
A vulnerability tracked as CVE-2025-40040 has been found in Kernel.
Attackers can target a specific entry point like VM_MERGEABLE over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 7.8/10.
What to do: upgrade Kernel to 5.4.302, 5.10.247, 5.15.197, 6.1.158, 6.6.114, 6.12.55, 6.17.3 or later.
If unsure, ask your IT team or search "Kernel CVE-2025-40040" on the vendor's site.
CVE-2025-40040 (Kernel) — CVSS v3 7.8
Attack vector: local / no user interaction
Attack surface: VM_MERGEABLE
Patched: 5.4.302, 5.10.247, 5.15.197, 6.1.158, 6.6.114, 6.12.55, 6.17.3 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (unclassified) exists in Kernel. Attackers reach the vulnerable code path via VM_MERGEABLE.
Check the vendor advisory for the affected versions of Kernel. Attack surface: VM_MERGEABLE.
Severity: High (CVSS 7.8/10). Successful exploitation can lead to full system takeover.
Update to 5.4.302, 5.10.247, 5.15.197, 6.1.158, 6.6.114, 6.12.55, 6.17.3.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'Kernel' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1
Identify exposureidentify
grep -r 'Kernel' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
Kernelを grep し、稼働しているサービス・バージョンを把握する。 -
2
Apply patchpatch
Upgrade Kernel to 5.4.302, 5.10.247, 5.15.197, 6.1.158, 6.6.114, 6.12.55, 6.17.3ステージング環境で 5.4.302, 5.10.247, 5.15.197, 6.1.158, 6.6.114, 6.12.55, 6.17.3 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3
Post-deployment verificationverify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| LinuxKernel |
≥ 4.6.0, < 5.4.302→ 5.4.302 ≥ 5.5.0, < 5.10.247→ 5.10.247 ≥ 5.11.0, < 5.15.197→ 5.15.197 ≥ 5.16.0, < 6.1.158→ 6.1.158 ≥ 6.2.0, < 6.6.114→ 6.6.114 ≥ 6.7.0, < 6.12.55→ 6.12.55 ≥ 6.13.0, < 6.17.3→ 6.17.3 |
5.4.302 5.10.247 5.15.197 6.1.158 6.6.114 6.12.55 6.17.3 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- BellSoft Alpaquita BELL-CVE-2025-40040 linux-lts Fix available
- Debian DEBIAN-CVE-2025-40040 linux-6.1, linux Fix available
- Ubuntu UBUNTU-CVE-2025-40040 linux-xilinx-zynqmp, linux-riscv-5.15, linux-riscv +38 more Fix available
Original description The description as published by the source.
In the Linux kernel, the following vulnerability has been resolved:
mm/ksm: fix flag-dropping behavior in ksm_madvise
syzkaller discovered the following crash: (kernel BUG)
[ 44.607039] ------------[ cut here ]------------
[ 44.607422] kernel BUG at mm/userfaultfd.c:2067!
[ 44.608148] Oops: invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN NOPTI
[ 44.608814] CPU: 1 UID: 0 PID: 2475 Comm: reproducer Not tainted 6.16.0-rc6 #1 PREEMPT(none)
[ 44.609635] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
[ 44.610695] RIP: 0010:userfaultfd_release_all+0x3a8/0x460
[ 44.617726] Call Trace:
[ 44.617926]
[ 44.619284] userfaultfd_release+0xef/0x1b0
[ 44.620976] __fput+0x3f9/0xb60
[ 44.621240] fput_close_sync+0x110/0x210
[ 44.622222] __x64_sys_close+0x8f/0x120
[ 44.622530] do_syscall_64+0x5b/0x2f0
[ 44.622840] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 44.623244] RIP: 0033:0x7f365bb3f227
Kernel panics because it detects UFFD inconsistency during
userfaultfd_release_all(). Specifically, a VMA which has a valid pointer
to vma->vm_userfaultfd_ctx, but no UFFD flags in vma->vm_flags.
The inconsistency is caused in ksm_madvise(): when user calls madvise()
with MADV_UNMEARGEABLE on a VMA that is registered for UFFD in MINOR mode,
it accidentally clears all flags stored in the upper 32 bits of
vma->vm_flags.
Assuming x86_64 kernel build, unsigned long is 64-bit and unsigned int and…
Source: NIST National Vulnerability Database NVD
References
- advisory github.com
- advisory nvd.nist.gov
- package git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org