From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7792440C15 for ; Sat, 2 Mar 2024 22:00:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709416805; cv=none; b=o7/EEBXJ7X5PGy0ulbhf+994Ta488KzbcafKueZJJ371fLfaMGMcVr83lxoLcygRQT+xeo88vL7SBU3Z5rTC9n5m7LNGhdcPIX0mNV6d1O7YQEe6wJLag3NXMwqHxWgpMvIiP3MYTz1fK3RJOjAaQbYQUZRoiIsTqVDOF4RDQMA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709416805; c=relaxed/simple; bh=RMEZlMQo+7+WlJJx9f+ar/N+Hir7C/4SS2EgOr/drwY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=heNAnutoX910dsHznsaUbtEsrfGeQeBiQ50zrBj2dEYxP5I4WXzemotE0VIIwQNqeHsNGs6Kq1Xa05N1CEyX/tnvQZS1Km38Uvu1+FFb2Mlq/8vCWskbk5SvUB9FSGvuNApDsL0tsibnkus/xE7BzOqYz4QsxCJ/WO53b+v+SOQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=aB0eeynI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="aB0eeynI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBFE8C433F1; Sat, 2 Mar 2024 22:00:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709416805; bh=RMEZlMQo+7+WlJJx9f+ar/N+Hir7C/4SS2EgOr/drwY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=aB0eeynII4H72ddavID3TBlWhTbv7VDtWXUsFRa6/jJOsdd25bYPclmGFwguoJDxl j41jttjGS5pBDaYD9Cd+jvDKfdvUf9cigmMLDmVVcJ/HaAxX0PXcxm+gtHoTXw2PKS SPxKmDqdk5HtyTOVbB2B2dGG3cFFysyTT27uiJhs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52559: iommu/vt-d: Avoid memory allocation in iommu_suspend() Date: Sat, 2 Mar 2024 22:59:53 +0100 Message-ID: <2024030252-CVE-2023-52559-680e@gregkh> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3584; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=RMEZlMQo+7+WlJJx9f+ar/N+Hir7C/4SS2EgOr/drwY=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmPF0bM2Pb52M0tSTFifyO/y4jNSTK9ZRgjesd44/W9L 7+9DLv0tSOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmonuMYX5i5QeRWRpHFqwy eKUklzrpygFdy0kM84MXH4p743j2YErG00fTlH5JMj0tPwQA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: iommu/vt-d: Avoid memory allocation in iommu_suspend() The iommu_suspend() syscore suspend callback is invoked with IRQ disabled. Allocating memory with the GFP_KERNEL flag may re-enable IRQs during the suspend callback, which can cause intermittent suspend/hibernation problems with the following kernel traces: Calling iommu_suspend+0x0/0x1d0 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 15 at kernel/time/timekeeping.c:868 ktime_get+0x9b/0xb0 ... CPU: 0 PID: 15 Comm: rcu_preempt Tainted: G U E 6.3-intel #r1 RIP: 0010:ktime_get+0x9b/0xb0 ... Call Trace: tick_sched_timer+0x22/0x90 ? __pfx_tick_sched_timer+0x10/0x10 __hrtimer_run_queues+0x111/0x2b0 hrtimer_interrupt+0xfa/0x230 __sysvec_apic_timer_interrupt+0x63/0x140 sysvec_apic_timer_interrupt+0x7b/0xa0 asm_sysvec_apic_timer_interrupt+0x1f/0x30 ... ------------[ cut here ]------------ Interrupts enabled after iommu_suspend+0x0/0x1d0 WARNING: CPU: 0 PID: 27420 at drivers/base/syscore.c:68 syscore_suspend+0x147/0x270 CPU: 0 PID: 27420 Comm: rtcwake Tainted: G U W E 6.3-intel #r1 RIP: 0010:syscore_suspend+0x147/0x270 ... Call Trace: hibernation_snapshot+0x25b/0x670 hibernate+0xcd/0x390 state_store+0xcf/0xe0 kobj_attr_store+0x13/0x30 sysfs_kf_write+0x3f/0x50 kernfs_fop_write_iter+0x128/0x200 vfs_write+0x1fd/0x3c0 ksys_write+0x6f/0xf0 __x64_sys_write+0x1d/0x30 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc Given that only 4 words memory is needed, avoid the memory allocation in iommu_suspend(). The Linux kernel CVE team has assigned CVE-2023-52559 to this issue. Affected and fixed versions =========================== Issue introduced in 5.11 with commit 33e07157105e and fixed in 5.15.136 with commit 29298c85a81a Issue introduced in 5.11 with commit 33e07157105e and fixed in 6.1.57 with commit c12ef025add7 Issue introduced in 5.11 with commit 33e07157105e and fixed in 6.5.7 with commit 496c591f0b38 Issue introduced in 5.11 with commit 33e07157105e and fixed in 6.6 with commit 59df44bfb0ca Please see https://www.kernel.org or 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-2023-52559 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: drivers/iommu/intel/iommu.c drivers/iommu/intel/iommu.h 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/29298c85a81abdc512e87537515ed4b1a9601d0e https://git.kernel.org/stable/c/c12ef025add77ca3a0902e8719d552b6d47b4282 https://git.kernel.org/stable/c/496c591f0b389eb782f36d9d4c2564b9a865eed0 https://git.kernel.org/stable/c/59df44bfb0ca4c3ee1f1c3c5d0ee8e314844799e