Skip to contentSkip to conversation

CVE-2026-89923: KVM: s390: Free guest debug data on vcpu destroy

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 16

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

KVM: s390: Free guest debug data on vcpu destroy

kvm_s390_clear_bp_data() is only called from kvm_arch_vcpu_ioctl_set_guest_debug(), i.e. when user space changes or disables debugging. A vCPU that is destroyed while hardware breakpoints are still armed - the normal case when the VMM just exits or crashes - leaks hw_bp_info, hw_wp_info and all old_data buffers, since generic KVM frees the vCPU right after kvm_arch_vcpu_destroy().

That is bounded by MAX_BP_COUNT entries, so roughly 8 KiB per vCPU, but it is unbounded over VM lifetimes. The allocations are GFP_KERNEL_ACCOUNT, so the charge also outlives the exiting process and pins dying memcgs.

Fix by clearing the debug data on vCPU destruction. Calling it unconditionally is fine: struct kvm_vcpu is zero allocated, so for a vCPU that never enabled debugging the counters are 0 and the pointers NULL.

The Linux kernel CVE team has assigned CVE-2026-89923 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 3.16 with commit 27291e2165b6de70c476b7b675308113edd69a60 and fixed in 5.10.270 with commit 053f2068cf9b0654b651fed5ad7649d3deb982bf
	Issue introduced in 3.16 with commit 27291e2165b6de70c476b7b675308113edd69a60 and fixed in 5.15.221 with commit 6c996b12bbe4a6023076e8eee3cfaf2cc99db76c
	Issue introduced in 3.16 with commit 27291e2165b6de70c476b7b675308113edd69a60 and fixed in 6.1.188 with commit d6280fc540d8f4653c9b54a78cb747e128070f5e
	Issue introduced in 3.16 with commit 27291e2165b6de70c476b7b675308113edd69a60 and fixed in 6.6.157 with commit 544a5a665019cef394ce8bda97fa7a2cab253781
	Issue introduced in 3.16 with commit 27291e2165b6de70c476b7b675308113edd69a60 and fixed in 6.12.110 with commit 9a32c4c6a6c23b7f5bf765eb5b83ba7f64a8ec63
	Issue introduced in 3.16 with commit 27291e2165b6de70c476b7b675308113edd69a60 and fixed in 6.18.51 with commit b5acacfdb8966abff91836c1c5bd7da59d8a526e
	Issue introduced in 3.16 with commit 27291e2165b6de70c476b7b675308113edd69a60 and fixed in 7.2.5 with commit e4d8b7f176b976474e0800ba71ee2dfa3ce263c9
	Issue introduced in 3.16 with commit 27291e2165b6de70c476b7b675308113edd69a60 and fixed in 7.3-rc1 with commit e7f698b09d4a7c36b299acf680fc50fe868e2bcd

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-89923

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/s390/kvm/kvm-s390.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/053f2068cf9b0654b651fed5ad7649d3deb982bf
	https://git.kernel.org/stable/c/6c996b12bbe4a6023076e8eee3cfaf2cc99db76c
	https://git.kernel.org/stable/c/d6280fc540d8f4653c9b54a78cb747e128070f5e
	https://git.kernel.org/stable/c/544a5a665019cef394ce8bda97fa7a2cab253781
	https://git.kernel.org/stable/c/9a32c4c6a6c23b7f5bf765eb5b83ba7f64a8ec63
	https://git.kernel.org/stable/c/b5acacfdb8966abff91836c1c5bd7da59d8a526e
	https://git.kernel.org/stable/c/e4d8b7f176b976474e0800ba71ee2dfa3ce263c9
	https://git.kernel.org/stable/c/e7f698b09d4a7c36b299acf680fc50fe868e2bcd