Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F2C8C32FA3C for ; Mon, 8 Jun 2026 15:47:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780933676; cv=none; b=DBdkWXDCVqysLIDefu6ZWlJU33sINvFpx2fUGvfvF23itsKe4uw9fVyER/PBMUzJIPrziVCGEp2Ht3Pb65E0eRK8NAs+XVJP6ZCzhBYOcdli/qvNcek8AIFdJ2ZadUrZU9L5OQEgjw1CWbSVkj9wJnq4AxpAd2tdjmF+JnXwI04= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780933676; c=relaxed/simple; bh=Shz+IFAnF+VZT+EKUtUtMNgKFbaZxat/mMRGVQOwN0k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=B7bwcnx270dF3G7IGrtNS2zV8oiLEmEMUX52AVVAXzlPTPBxp3T182tdhBC9H/jWHkAlXPnTGEyA5V5+OIVnqnunSg8rPk0HRbT/rHlr0ZAd7l10AaUs7ioXYNR5r3C/bQXRA/as4lvbl+wfRGn9qu+8fRTbblH0t2HlvJZV3hc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gyOrPM5q; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="gyOrPM5q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE9BF1F00893; Mon, 8 Jun 2026 15:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780933674; bh=MerwlCxbF1Ty4zr2pWqJGbkoEAEgu1khRjPiU7kc80Q=; h=From:To:Cc:Subject:Date:Reply-To; b=gyOrPM5qj6gsErcZ3DJO5VfDXiJRIabt7p50dktJjzpfJAu9MtkP6VtNT1/E0jGsY mZilMyC/SyDOf8c9Rxrc1hr1zP0sW1gyqaAXzo9G5TorjZAmTzGFVtxjH7wr2meEPe X5nj5hpqaqJ9u3LxYoY5H2qsUNJLM5MjFYVenMnc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-46295: KVM: x86: Do IRR scan in __kvm_apic_update_irr even if PIR is empty Date: Mon, 8 Jun 2026 17:46:03 +0200 Message-ID: <2026060858-CVE-2026-46295-a5d0@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4127; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=FDpWmNwtWf5LUXo8ALUYwJ4EdgrLsIxYbD7YQX9LBpU=; b=kA0DAAIRMUfUDdst+ykByyZiAGom47bIzbypLR8WyZjFjwt4wHF4EG5Ol5jkWIAkRMLnAMkmm 4hdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmom47YACgkQMUfUDdst+yncMgCfZOIC keoFg0QJXdYwpmD/lsf1VvkAn2HvNQ9cCvMo5/LH0wcYR8p/r/xt X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: KVM: x86: Do IRR scan in __kvm_apic_update_irr even if PIR is empty Fall back to apic_find_highest_vector() when PID.ON is set but PIR turns out to be empty, to correctly report the highest pending interrupt from the existing IRR. In a nested VM stress test, the following WARNING fires in vmx_check_nested_events() when kvm_cpu_has_interrupt() reports a pending interrupt but the subsequent kvm_apic_has_interrupt() (which invokes vmx_sync_pir_to_irr() again) returns -1: WARNING: CPU: 99 PID: 57767 at arch/x86/kvm/vmx/nested.c:4449 vmx_check_nested_events+0x6bf/0x6e0 [kvm_intel] Call Trace: kvm_check_and_inject_events vcpu_enter_guest.constprop.0 vcpu_run kvm_arch_vcpu_ioctl_run kvm_vcpu_ioctl __x64_sys_ioctl do_syscall_64 entry_SYSCALL_64_after_hwframe The root cause is a race between vmx_sync_pir_to_irr() on the target vCPU and __vmx_deliver_posted_interrupt() on a sender vCPU. The sender performs two individually-atomic operations that are not a single transaction: 1. pi_test_and_set_pir(vector) -- sets the PIR bit 2. pi_test_and_set_on() -- sets PID.ON The following interleaving triggers the bug: Sender vCPU (IPI): Target vCPU (1st sync_pir_to_irr): B1: set PIR[vector] A1: pi_clear_on() A2: pi_harvest_pir() -> sees B1 bit A3: xchg() -> consumes bit, PIR=0 (1st sync returns correct max_irr) B2: set PID.ON = 1 Target vCPU (2nd sync_pir_to_irr): C1: pi_test_on() -> TRUE (from B2) C2: pi_clear_on() -> ON=0 C3: pi_harvest_pir() -> PIR empty C4: *max_irr = -1, early return IRR NOT SCANNED The interrupt is not lost (it resides in the IRR from the first sync and is recovered on the next vcpu_enter_guest() iteration), but the incorrect max_irr causes a spurious WARNING and a wasted L2 VM-Enter/VM-Exit cycle. The Linux kernel CVE team has assigned CVE-2026-46295 to this issue. Affected and fixed versions =========================== Issue introduced in 6.16 with commit b41f8638b9d30fbe045b4ef83ff4136c56a57397 and fixed in 6.18.30 with commit bb1703949dcaa9a49c338dee075f659f4634214d Issue introduced in 6.16 with commit b41f8638b9d30fbe045b4ef83ff4136c56a57397 and fixed in 7.0.7 with commit 4b6b06a8b12bfd95f9015074b1430c1480908073 Issue introduced in 6.16 with commit b41f8638b9d30fbe045b4ef83ff4136c56a57397 and fixed in 7.1-rc3 with commit 33fd0ccd2590b470b65adcca288615ad3b5e3e06 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-46295 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: arch/x86/kvm/lapic.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/bb1703949dcaa9a49c338dee075f659f4634214d https://git.kernel.org/stable/c/4b6b06a8b12bfd95f9015074b1430c1480908073 https://git.kernel.org/stable/c/33fd0ccd2590b470b65adcca288615ad3b5e3e06