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 CF58C14831F for ; Thu, 27 Feb 2025 02:08:59 +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=1740622139; cv=none; b=g6XCmbvoN1WgqijFdFE+zzceFo1C1IIrYBS39Zt5JjDHX60cHbsnwPsmEq/3KJp8aiTE2GqjYNcgRcZzqkGgNoZ7vjPv2pN1pzIP9F0NRSEy1nfCHzTFTuMxYP/0NE1rtfXFcTlWAkrVtuB4azS9YujAqG0wQBvbrJpLyyQTnRs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740622139; c=relaxed/simple; bh=DdLWx4u+Zoy/PBEBw7q+W6UzhW1hMajntrT5riAzZxI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=s9bgAy8YgJawjYtxPMqNsKaFAc/LAcjkKse15A6yhfiyGEysI5LEcUqzADzGeXzj4PcJAcFU7kWYlyfOysVn8fGgzQalDwc3jGhmRTsji/m4IQ/VLokup22Vhcq4ZpTvhou0+DdpwUOs5vyVHBVJF5nT7jHjmSMiQXXCMQBUzGc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hBdVU/at; 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="hBdVU/at" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2921C4CED6; Thu, 27 Feb 2025 02:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740622139; bh=DdLWx4u+Zoy/PBEBw7q+W6UzhW1hMajntrT5riAzZxI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=hBdVU/atxSzhzTgu3SV/JPNVon1UWyIDhGZRKmJJZZsFg/GW8huFjHzPOrtFhW/e9 GdW4UEy/51XUOYVq+O/1+DLtno17uLIrZj6lssOfjEpzJLXDO3q7+sm1on4KiQjjd1 bMykHF4fZODnzCsjA8SC1WpeweaiqlnE3zUihDZw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21724: iommufd/iova_bitmap: Fix shift-out-of-bounds in iova_bitmap_offset_to_index() Date: Wed, 26 Feb 2025 18:06:19 -0800 Message-ID: <2025022647-CVE-2025-21724-f4b1@gregkh> X-Mailer: git-send-email 2.48.1 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=2998; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=DdLWx4u+Zoy/PBEBw7q+W6UzhW1hMajntrT5riAzZxI=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7T1SnzxH9YPk+3Mb7FEPTijdKZyY5y20+sdr2tdzxy w2z1K0bO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiZ5czLOisPN1VsHWJw97d mmsXvn/yR6Jfppdhnn1ZyrSlbJ/zt1XPv86iMj/A5/vKaQA= 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: iommufd/iova_bitmap: Fix shift-out-of-bounds in iova_bitmap_offset_to_index() Resolve a UBSAN shift-out-of-bounds issue in iova_bitmap_offset_to_index() where shifting the constant "1" (of type int) by bitmap->mapped.pgshift (an unsigned long value) could result in undefined behavior. The constant "1" defaults to a 32-bit "int", and when "pgshift" exceeds 31 (e.g., pgshift = 63) the shift operation overflows, as the result cannot be represented in a 32-bit type. To resolve this, the constant is updated to "1UL", promoting it to an unsigned long type to match the operand's type. The Linux kernel CVE team has assigned CVE-2025-21724 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1 with commit 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1 and fixed in 6.1.129 with commit 44d9c94b7a3f29a3e07c4753603a35e9b28842a3 Issue introduced in 6.1 with commit 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1 and fixed in 6.6.76 with commit 38ac76fc06bc6826a3e4b12a98efbe98432380a9 Issue introduced in 6.1 with commit 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1 and fixed in 6.12.13 with commit d5d33f01b86af44b23eea61ee309e4ef22c0cdfe Issue introduced in 6.1 with commit 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1 and fixed in 6.13.2 with commit b1f8453b8ff1ab79a03820ef608256c499769cb6 Issue introduced in 6.1 with commit 58ccf0190d19d9a8a41f8a02b9e06742b58df4a1 and fixed in 6.14-rc1 with commit e24c1551059268b37f6f40639883eafb281b8b9c 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-2025-21724 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/iommufd/iova_bitmap.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/44d9c94b7a3f29a3e07c4753603a35e9b28842a3 https://git.kernel.org/stable/c/38ac76fc06bc6826a3e4b12a98efbe98432380a9 https://git.kernel.org/stable/c/d5d33f01b86af44b23eea61ee309e4ef22c0cdfe https://git.kernel.org/stable/c/b1f8453b8ff1ab79a03820ef608256c499769cb6 https://git.kernel.org/stable/c/e24c1551059268b37f6f40639883eafb281b8b9c