CVE-2025-39704: LoongArch: KVM: Fix stack protector issue in send_ipi_data()
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: KVM: Fix stack protector issue in send_ipi_data()
Function kvm_io_bus_read() is called in function send_ipi_data(), buffer
size of parameter *val should be at least 8 bytes. Since some emulation
functions like loongarch_ipi_readl() and kvm_eiointc_read() will write
the buffer *val with 8 bytes signed extension regardless parameter len.
Otherwise there will be buffer overflow issue when CONFIG_STACKPROTECTOR
is enabled. The bug report is shown as follows:
Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: send_ipi_data+0x194/0x1a0 [kvm]
CPU: 11 UID: 107 PID: 2692 Comm: CPU 0/KVM Not tainted 6.17.0-rc1+ #102 PREEMPT(full)
Stack : 9000000005901568 0000000000000000 9000000003af371c 900000013c68c000
900000013c68f850 900000013c68f858 0000000000000000 900000013c68f998
900000013c68f990 900000013c68f990 900000013c68f6c0 fffffffffffdb058
fffffffffffdb0e0 900000013c68f858 911e1d4d39cf0ec2 9000000105657a00
0000000000000001 fffffffffffffffe 0000000000000578 282049464555206e
6f73676e6f6f4c20 0000000000000001 00000000086b4000 0000000000000000
0000000000000000 0000000000000000 9000000005709968 90000000058f9000
900000013c68fa68 900000013c68fab4 90000000029279f0 900000010153f940
900000010001f360 0000000000000000 9000000003af3734 000000004390000c
00000000000000b0 0000000000000004 0000000000000000 0000000000071c1d
...
Call Trace:
[<9000000003af3734>] show_stack+0x5c/0x180
[<9000000003aed168>] dump_stack_lvl+0x6c/0x9c
[<9000000003ad0ab0>] vpanic+0x108/0x2c4
[<9000000003ad0ca8>] panic+0x3c/0x40
[<9000000004eb0a1c>] __stack_chk_fail+0x14/0x18
[<ffff8000023473f8>] send_ipi_data+0x190/0x1a0 [kvm]
[<ffff8000023313e4>] __kvm_io_bus_write+0xa4/0xe8 [kvm]
[<ffff80000233147c>] kvm_io_bus_write+0x54/0x90 [kvm]
[<ffff80000233f9f8>] kvm_emu_iocsr+0x180/0x310 [kvm]
[<ffff80000233fe08>] kvm_handle_gspr+0x280/0x478 [kvm]
[<ffff8000023443e8>] kvm_handle_exit+0xc0/0x130 [kvm]
Security readout for executives and security teams
Plain-English summary
A stack buffer overflow in Linux KVM on LoongArch systems can corrupt the host kernel stack and cause a panic. The supplied CVSS assessment also indicates possible confidentiality and integrity impact. Organizations not using LoongArch KVM are unlikely to be exposed.
Executive priority
Treat as high priority for LoongArch KVM infrastructure, especially where less-trusted users or guests operate. Scope first: conventional x86 and Arm systems are not identified as affected. Expedite vendor-confirmed kernel updates, but do not characterize this as actively exploited based on the supplied evidence.
Technical view
send_ipi_data() supplies an undersized buffer to kvm_io_bus_read(). LoongArch IPI and EIOINTC emulation functions may write eight bytes regardless of the requested length, overflowing the stack when CONFIG_STACKPROTECTOR is enabled. The supplied trace shows stack corruption detected during KVM guest execution.
Likely exposure
Exposure is limited to affected Linux kernels on LoongArch systems using KVM. The bundle identifies versions 6.13, 6.16.4, and 6.17 as affected, but its version data is ambiguous and should be confirmed against distribution advisories and the referenced fixes.
Exploitation context
The supplied record is not in CISA KEV and provides no evidence of active exploitation or a public exploit. Its CVSS vector describes a local, low-privilege, low-complexity path without user interaction. The demonstrated result is a host kernel panic; broader impact is scored but not demonstrated here.
Researcher notes
The defect is an eight-byte write into an inadequately sized stack buffer along the LoongArch KVM I/O-bus path. Stack protection turns observed corruption into a panic. Two stable-kernel commits are cited as fixes. The bundle does not establish exploitability beyond the crash or clarify all affected and fixed release boundaries.
Mitigation direction
Update to a vendor-supported kernel containing one of the referenced fixes.
Confirm fixed package versions with the relevant Linux distribution or kernel vendor.
Prioritize LoongArch virtualization hosts running KVM and affected kernel versions.
Where updating is delayed, consider suspending untrusted KVM workloads on exposed LoongArch hosts.
Validation and detection
Inventory LoongArch hosts, deployed kernel versions, and active KVM usage.
Check whether CONFIG_STACKPROTECTOR is enabled in each relevant kernel build.
Verify deployed source or package changelogs include the referenced fixing commit.
Review kernel logs for stack-protector failures mentioning send_ipi_data or KVM panics.
Recheck affected-version boundaries against current vendor guidance.
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-39704 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
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.
1CVSS vectors
3Timeline events
0ADP providers
3Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.