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 705282E6CC0 for ; Wed, 1 Oct 2025 11:56:14 +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=1759319774; cv=none; b=YKf74IEkvEGo4npm63exMJn3yK6BchoiLFRd4V6aHKJcXyN0k7ofToIp6opgC2AVV3Mn3TUNqoMeuZ43jIAExcjU8jUxxeFe0LcHn8qST1DAl7qsRJKX4x3EIaxtrzOoUKkgXJ9n0CLktkJDginrgvPAvx59eO6AelnkyQkvaoQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759319774; c=relaxed/simple; bh=K+ngdCWWDkKDy5Hc8ZvOT+WI1dbzBjrC3lFIFBecCGg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=H3kn0K8ooe9/4w/fZZbPMNxH4GwPN0ycduyqm6Tt6Jgij0STp8eJ4US8LS8rvEHZ3EkqHKSJDzlW1//plV9Dwc6n/KtXcGHrvVgujN+npJvIWktDw85GQowEI3pUr/JUCIbMD+i0QenHXt++d8g7W8CpSesfx59Fy9hFDvn363w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UFK4MQM3; 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="UFK4MQM3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D21FC4CEF4; Wed, 1 Oct 2025 11:56:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759319774; bh=K+ngdCWWDkKDy5Hc8ZvOT+WI1dbzBjrC3lFIFBecCGg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=UFK4MQM3/DNtltIRDyOuxxIicSGTbvJLHmnJgzkXZMpwXuTXI1AOHfEFizKpOuLHO XfzKm/kSeoPvF0k0iFjmzoyrdCCRymHsfQ+ee8SUCeqKoD9dI+DjejmBwXa0UHOXmd 0z4e8EwBv6fPgr3vVTkunlDOaiVKMYS2hDVgZy7I= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-4460: drm/amdkfd: Fix UBSAN shift-out-of-bounds warning Date: Wed, 1 Oct 2025 13:45:14 +0200 Message-ID: <2025100114-CVE-2021-4460-aa71@gregkh> X-Mailer: git-send-email 2.51.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=2427; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fj99kx+R+LxDvulGKqJ89txqtHt5HDVWdiR7f8gqfV4=; b=owGbwMvMwCRo6H6F97bub03G02pJDBl3RbyelKwO2f5NTup5/+r+ta8kNwdWWzN1Za4yi/V3a hb0VLbriGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIkwRTHMU6xi/nYp6/sf/fiw Sv7olRyLGhb9Y1hwtUF0got/zN53MVJiMsv8ynft2+0FAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: Fix UBSAN shift-out-of-bounds warning If get_num_sdma_queues or get_num_xgmi_sdma_queues is 0, we end up doing a shift operation where the number of bits shifted equals number of bits in the operand. This behaviour is undefined. Set num_sdma_queues or num_xgmi_sdma_queues to ULLONG_MAX, if the count is >= number of bits in the operand. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1472 The Linux kernel CVE team has assigned CVE-2021-4460 to this issue. Affected and fixed versions =========================== Fixed in 5.4.118 with commit 0c0356ef2498c1a250fe3846f30293f828737309 Fixed in 5.10.36 with commit 1874b0ef1426b873de94c61861e38f29a8df714c Fixed in 5.11.20 with commit 3fdc5182700910a685d23df57d65166e8556a266 Fixed in 5.12.3 with commit 9069b1b542de8f3bbffef868aff41521b21485cf Fixed in 5.13 with commit 50e2fc36e72d4ad672032ebf646cecb48656efe0 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-2021-4460 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/gpu/drm/amd/amdkfd/kfd_device_queue_manager.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/0c0356ef2498c1a250fe3846f30293f828737309 https://git.kernel.org/stable/c/1874b0ef1426b873de94c61861e38f29a8df714c https://git.kernel.org/stable/c/3fdc5182700910a685d23df57d65166e8556a266 https://git.kernel.org/stable/c/9069b1b542de8f3bbffef868aff41521b21485cf https://git.kernel.org/stable/c/50e2fc36e72d4ad672032ebf646cecb48656efe0