CVE-2025-39704

Source
https://cve.org/CVERecord?id=CVE-2025-39704
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39704.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-39704
Downstream
Published
2025-09-05T17:21:10.890Z
Modified
2025-12-02T17:56:56.934345Z
Summary
LoongArch: KVM: Fix stack protector issue in send_ipi_data()
Details

In the Linux kernel, the following vulnerability has been resolved:

LoongArch: KVM: Fix stack protector issue in sendipidata()

Function kvmiobusread() is called in function sendipidata(), buffer size of parameter *val should be at least 8 bytes. Since some emulation functions like loongarchipireadl() and kvmeiointc_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: sendipidata+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>] showstack+0x5c/0x180 [<9000000003aed168>] dumpstacklvl+0x6c/0x9c [<9000000003ad0ab0>] vpanic+0x108/0x2c4 [<9000000003ad0ca8>] panic+0x3c/0x40 [<9000000004eb0a1c>] _stackchkfail+0x14/0x18 [<ffff8000023473f8>] sendipidata+0x190/0x1a0 [kvm] [<ffff8000023313e4>] _kvmiobuswrite+0xa4/0xe8 [kvm] [<ffff80000233147c>] kvmiobuswrite+0x54/0x90 [kvm] [<ffff80000233f9f8>] kvmemuiocsr+0x180/0x310 [kvm] [<ffff80000233fe08>] kvmhandlegspr+0x280/0x478 [kvm] [<ffff8000023443e8>] kvmhandle_exit+0xc0/0x130 [kvm]

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39704.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
daee2f9cae5510ba1bd9eed6b0cf0ca8dc276118
Fixed
b5b49d341f90eed6de794b6ff34ad3dd66d34343
Fixed
5c68549c81bcca70fc464e305ffeefd9af968287

Affected versions

v6.*
v6.12
v6.13
v6.13-rc1
v6.13-rc2
v6.13-rc3
v6.13-rc4
v6.13-rc5
v6.13-rc6
v6.13-rc7
v6.14
v6.14-rc1
v6.14-rc2
v6.14-rc3
v6.14-rc4
v6.14-rc5
v6.14-rc6
v6.14-rc7
v6.15
v6.15-rc1
v6.15-rc2
v6.15-rc3
v6.15-rc4
v6.15-rc5
v6.15-rc6
v6.15-rc7
v6.16
v6.16-rc1
v6.16-rc2
v6.16-rc3
v6.16-rc4
v6.16-rc5
v6.16-rc6
v6.16-rc7
v6.16.1
v6.16.2
v6.16.3
v6.17-rc1
v6.17-rc2

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39704.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.16.4

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39704.json"