{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-39704",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T07:20:57.115Z",
        "datePublished": "2025-09-05T17:21:10.890Z",
        "dateUpdated": "2026-08-05T12:04:43.088Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T12:04:43.088Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: KVM: Fix stack protector issue in send_ipi_data()\n\nFunction kvm_io_bus_read() is called in function send_ipi_data(), buffer\nsize of parameter *val should be at least 8 bytes. Since some emulation\nfunctions like loongarch_ipi_readl() and kvm_eiointc_read() will write\nthe buffer *val with 8 bytes signed extension regardless parameter len.\n\nOtherwise there will be buffer overflow issue when CONFIG_STACKPROTECTOR\nis enabled. The bug report is shown as follows:\n\nKernel panic - not syncing: stack-protector: Kernel stack is corrupted in: send_ipi_data+0x194/0x1a0 [kvm]\nCPU: 11 UID: 107 PID: 2692 Comm: CPU 0/KVM Not tainted 6.17.0-rc1+ #102 PREEMPT(full)\nStack : 9000000005901568 0000000000000000 9000000003af371c 900000013c68c000\n        900000013c68f850 900000013c68f858 0000000000000000 900000013c68f998\n        900000013c68f990 900000013c68f990 900000013c68f6c0 fffffffffffdb058\n        fffffffffffdb0e0 900000013c68f858 911e1d4d39cf0ec2 9000000105657a00\n        0000000000000001 fffffffffffffffe 0000000000000578 282049464555206e\n        6f73676e6f6f4c20 0000000000000001 00000000086b4000 0000000000000000\n        0000000000000000 0000000000000000 9000000005709968 90000000058f9000\n        900000013c68fa68 900000013c68fab4 90000000029279f0 900000010153f940\n        900000010001f360 0000000000000000 9000000003af3734 000000004390000c\n        00000000000000b0 0000000000000004 0000000000000000 0000000000071c1d\n        ...\nCall Trace:\n[<9000000003af3734>] show_stack+0x5c/0x180\n[<9000000003aed168>] dump_stack_lvl+0x6c/0x9c\n[<9000000003ad0ab0>] vpanic+0x108/0x2c4\n[<9000000003ad0ca8>] panic+0x3c/0x40\n[<9000000004eb0a1c>] __stack_chk_fail+0x14/0x18\n[<ffff8000023473f8>] send_ipi_data+0x190/0x1a0 [kvm]\n[<ffff8000023313e4>] __kvm_io_bus_write+0xa4/0xe8 [kvm]\n[<ffff80000233147c>] kvm_io_bus_write+0x54/0x90 [kvm]\n[<ffff80000233f9f8>] kvm_emu_iocsr+0x180/0x310 [kvm]\n[<ffff80000233fe08>] kvm_handle_gspr+0x280/0x478 [kvm]\n[<ffff8000023443e8>] kvm_handle_exit+0xc0/0x130 [kvm]"
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H",
                        "baseScore": 8.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The attacker must be executing code inside a KVM guest on the target host, reaching the host kernel via a GSPR exit rather than over a network. Guest-to-host hypervisor attacks are scored as local access to the vulnerable component.\nAC:L - A single `iocsrwr.d` to IOCSR_ANY_SEND with crafted data deterministically drives the 8-byte store into the 4-byte stack object — no race, no memory-layout luck, and the guest even chooses the overflowing value via EIOINTC sign extension.\nPR:L - Relative to the host, the attacker only needs the ability to run a VM (/dev/kvm access, routinely granted to unprivileged/low-privileged VM users and cloud tenants); no host administrative rights are required.\nUI:N - The guest triggers the overflow entirely on its own during normal vCPU execution; no host operator or other user needs to take any action.\nS:C - A guest corrupts host kernel stack memory, crossing the guest/hypervisor security boundary and impacting the host and all co-resident VMs — a different security authority than the vulnerable guest.\nC:H - The same defect makes `kvm_io_bus_write()` read 8 bytes out of the 4-byte stack object, feeding adjacent host kernel stack contents into guest-readable emulated device registers, and host kernel stack corruption is leverageable toward broader disclosure.\nI:H - The guest achieves an out-of-bounds write of a value it selects (0x00000000 or 0xFFFFFFFF via EIOINTC sign extension) into the host kernel stack frame, clobbering adjacent locals/saved state — memory corruption exploitable toward control-flow influence.\nA:H - The bug is confirmed in the wild to produce `Kernel panic - not syncing: stack-protector: Kernel stack is corrupted`, taking down the entire host and every VM running on it, repeatably at guest will."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "arch/loongarch/kvm/intc/ipi.c"
                    ],
                    "versions": [
                        {
                            "version": "daee2f9cae5510ba1bd9eed6b0cf0ca8dc276118",
                            "lessThan": "b5b49d341f90eed6de794b6ff34ad3dd66d34343",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "daee2f9cae5510ba1bd9eed6b0cf0ca8dc276118",
                            "lessThan": "5c68549c81bcca70fc464e305ffeefd9af968287",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "arch/loongarch/kvm/intc/ipi.c"
                    ],
                    "versions": [
                        {
                            "version": "6.13",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.13",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.16.4",
                            "lessThanOrEqual": "6.16.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.17",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.13",
                                    "versionEndExcluding": "6.16.4"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.13",
                                    "versionEndExcluding": "6.17"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/b5b49d341f90eed6de794b6ff34ad3dd66d34343"
                },
                {
                    "url": "https://git.kernel.org/stable/c/5c68549c81bcca70fc464e305ffeefd9af968287"
                }
            ],
            "title": "LoongArch: KVM: Fix stack protector issue in send_ipi_data()",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}