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 C70E86FBD for ; Fri, 23 Feb 2024 14:47:40 +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=1708699660; cv=none; b=r4vez2xVEnWqW+6YmOZh85GJIwYQqqKfsUQAwPOxn95CZodBktGdT0bIe/2FllI+0++kk1Rg6pLz8KJMoUKpBJCw2TUthcFBl8+YaYcOZT/Om2xjGiUy6hy7YVS0bxm2DjRN5ETFjtyANezmMbGpfihQ/Z0BGXuDGH0bFUA8hTo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708699660; c=relaxed/simple; bh=tHqVIKHvYeUnvlpkOhde7+vApycxCIqnEjxLcVzqq10=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=S8AG2258YLtg4T1YCTRgENYeumtUpDcBVzhH+Lg6NnoEXv0DGMKFsGsrUXs6JyEclX1a6b+9cS5usyJSGQalkD5QkKQvIa53SWF7cRjAPW28m1XYnCKj/JdmMvYFm7K6Ze5ov1xPcxzBJufJ6mt7qWNkFAuB/bBz56KN9i7UlBQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VjCxWf8o; 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="VjCxWf8o" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09179C433C7; Fri, 23 Feb 2024 14:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708699660; bh=tHqVIKHvYeUnvlpkOhde7+vApycxCIqnEjxLcVzqq10=; h=From:To:Cc:Subject:Date:Reply-to:From; b=VjCxWf8o0J1WhOQ6aCHNcU9cu2PeM/VwpaqtCdY+89bIbwIpfEpw1X5h+OyqEuPuU MVfcYae9llHGXHxnfONzk6Jgtm1up55OnuLCTJQZa7lr2tmPWzXNcCbUCw7wbEGj0b sctIKTUn9XlrGi4faVBtuUePvIO1I38c1PcHuV4A= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52455: iommu: Don't reserve 0-length IOVA region Date: Fri, 23 Feb 2024 15:47:31 +0100 Message-ID: <2024022331-CVE-2023-52455-a28f@gregkh> X-Mailer: git-send-email 2.43.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=2608; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=tHqVIKHvYeUnvlpkOhde7+vApycxCIqnEjxLcVzqq10=; b=owGbwMvMwCRo6H6F97bub03G02pJDKk3NjDfWvV6nsGv5w2zWxakT2mPjii5tDHLe05sDi/Xx VnStxrudsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEdEwZ5kdGzfstz3tdkVXx kcPcizHvP/Lt8GJYMDMgx+1n7bXqtNlG8by9tf/2r7p+HgA= 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: Don't reserve 0-length IOVA region When the bootloader/firmware doesn't setup the framebuffers, their address and size are 0 in "iommu-addresses" property. If IOVA region is reserved with 0 length, then it ends up corrupting the IOVA rbtree with an entry which has pfn_hi < pfn_lo. If we intend to use display driver in kernel without framebuffer then it's causing the display IOMMU mappings to fail as entire valid IOVA space is reserved when address and length are passed as 0. An ideal solution would be firmware removing the "iommu-addresses" property and corresponding "memory-region" if display is not present. But the kernel should be able to handle this by checking for size of IOVA region and skipping the IOVA reservation if size is 0. Also, add a warning if firmware is requesting 0-length IOVA region reservation. The Linux kernel CVE team has assigned CVE-2023-52455 to this issue. Affected and fixed versions =========================== Issue introduced in 6.3 with commit a5bf3cfce8cb and fixed in 6.6.14 with commit 98b8a550da83 Issue introduced in 6.3 with commit a5bf3cfce8cb and fixed in 6.7.2 with commit 5e23e283910c Issue introduced in 6.3 with commit a5bf3cfce8cb and fixed in 6.8-rc1 with commit bb57f6705960 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-52455 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/of_iommu.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/98b8a550da83cc392a14298c4b3eaaf0332ae6ad https://git.kernel.org/stable/c/5e23e283910c9f30248732ae0770bcb0c9438abf https://git.kernel.org/stable/c/bb57f6705960bebeb832142ce9abf43220c3eab1