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 BE1051AB503 for ; Thu, 20 Jun 2024 11:18:04 +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=1718882284; cv=none; b=Yw6o7vQyyrj0oJAskHOVoQJoLUVNWPqoeZ46APLVK228pgi8YbgyXRNIxlUHX2MbOKJzr6uqEiQrlJZIPA6VSn4jOToW2Ilz9AAcNmULRP8nwgZvuiSui61mOrnLRJi/X0U4l7PE1rS6A5IcsTXXd7pXtbLkM+KHdlLoXlKPhvE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718882284; c=relaxed/simple; bh=g4CSxVWCnZLneTOrIcSo1dikLkwp7S5XuJXsZ0BnveQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DnGq6Omx9mKmqIBeUhxN4ux8iYFQlfIQ4cphaaJ4NJ4Vpk27X2Jdu/nhB4et2sWnSP7zW0IMFuQR8E24G78HRLv7HFpEOy/kvwG6+cGhpN2ePxI85EreHVxkad7FxLTlmCNtC7iGkZJhqEsfb5z9QuwbOzQvCX8OoKvSkINEoIM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=B3ZvaSb+; 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="B3ZvaSb+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08051C32781; Thu, 20 Jun 2024 11:18:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718882284; bh=g4CSxVWCnZLneTOrIcSo1dikLkwp7S5XuJXsZ0BnveQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=B3ZvaSb+lU1U9rFNcM5qIubmqgbjJrb0xq/yn3OCUnoc9zhMjpoesZxoaI1DE1jEL CwXkPE5o6tDPNjl5pQSkJjFZ2B+TPfVdcdZaBVBnGgFh6DK53nIoY6rUVsYjUcs5MI iqcyO2SnkIaPXJxyij3B0Z8yvnt3U2X6H0YIiiXk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48724: iommu/vt-d: Fix potential memory leak in intel_setup_irq_remapping() Date: Thu, 20 Jun 2024 13:16:04 +0200 Message-ID: <2024062057-CVE-2022-48724-6bcd@gregkh> X-Mailer: git-send-email 2.45.2 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=3095; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=g4CSxVWCnZLneTOrIcSo1dikLkwp7S5XuJXsZ0BnveQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkl/Ln7TystWPTrkszz7+ILNqRH1ZZ47LCWm8qlfFVmh p/e4m2GHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRYzMYFjS3HXHh/Df9dFvd C5X2jtPll3WnCDPMD937+aHstAlJ7SorjbTWiNapLjuuDgA= 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: Fix potential memory leak in intel_setup_irq_remapping() After commit e3beca48a45b ("irqdomain/treewide: Keep firmware node unconditionally allocated"). For tear down scenario, fn is only freed after fail to allocate ir_domain, though it also should be freed in case dmar_enable_qi returns error. Besides free fn, irq_domain and ir_msi_domain need to be removed as well if intel_setup_irq_remapping fails to enable queued invalidation. Improve the rewinding path by add out_free_ir_domain and out_free_fwnode lables per Baolu's suggestion. The Linux kernel CVE team has assigned CVE-2022-48724 to this issue. Affected and fixed versions =========================== Issue introduced in 4.14.190 with commit 03992c88d71b and fixed in 4.14.265 with commit a0c685ba9996 Issue introduced in 4.19.135 with commit c0c489e54305 and fixed in 4.19.228 with commit a31cb1f0fb6c Issue introduced in 5.4.54 with commit 36f735554572 and fixed in 5.4.178 with commit 5c43d46daa0d Issue introduced in 5.8 with commit e3beca48a45b and fixed in 5.10.99 with commit 9d9995b0371e Issue introduced in 5.8 with commit e3beca48a45b and fixed in 5.15.22 with commit 336d096b62bd Issue introduced in 5.8 with commit e3beca48a45b and fixed in 5.16.8 with commit b62eceb5f8f0 Issue introduced in 5.8 with commit e3beca48a45b and fixed in 5.17 with commit 99e675d473eb Issue introduced in 5.7.11 with commit b4198ecddb87 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-2022-48724 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/irq_remapping.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/a0c685ba99961b1dd894b2e470e692a539770f6d https://git.kernel.org/stable/c/a31cb1f0fb6caf46ffe88c41252b6b7a4ee062d9 https://git.kernel.org/stable/c/5c43d46daa0d2928234dd2792ebebc35d29ee2d1 https://git.kernel.org/stable/c/9d9995b0371e4e8c18d4f955479e5d47efe7b2d4 https://git.kernel.org/stable/c/336d096b62bdc673e852b6b80d5072d7888ce85d https://git.kernel.org/stable/c/b62eceb5f8f08815fe3f945fc55bbf997c344ecd https://git.kernel.org/stable/c/99e675d473eb8cf2deac1376a0f840222fc1adcf