Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 A23F122A4EE for ; Tue, 6 Oct 2026 08:46:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791276365; cv=none; b=OockeR0SaISVJiUAjh1ofvKUYokb8nudx+sMBH0sg43HWxJT3UFYVHOP/+Z2+jBKA5AQhvoXnDMk2gF6lugc9VI0LIfzXxsXpKokhIiDWFN0EFtqd1OUaR8z4ZEl8Tu2GmRkrXRRQbjwAsIVK56E4wxhztuKreQjs3VEm4PvkmY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791276365; c=relaxed/simple; bh=A1buxlDtTbo5IIBb4KgrkxX+s7hp4Yk8KMlh8Qxg5dI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ezSHVe0F2jJYM6xUSQysnoIQumjcW1FswxNG92B9RYETBwJDzjckcXQS67LE2CBPmo3331sl4NdUMYawd0Iwi2aZJMKtK7pxEPQzD2fkeIl7Ma4vlXFg+hH+b4AbT5aGgiE+5KhUJ22Ul0VtM08uP+OiXeRR1mv5qgsyLdl9Ntk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MIkx5BdD; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="MIkx5BdD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6EF4C1F000FF; Tue, 6 Oct 2026 08:46:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791276364; bh=+yol7CELXMDLzA0yNaHsZgj7JB9K83OZ9gywD0z1oC8=; h=From:To:Cc:Subject:Date:Reply-To; b=MIkx5BdDU6rAP8CF3p/TpaaPUiG4v9Z8ozIK7eUbs8mZHD6DiE8K3CMIDe5zAQrLM 1sbzJ97Xkk76//9gxI3yIIuL1uT143syRqtGI3Gzw4qvQaSaPNfUeZWT0pL5WaXu0v uYQdrfL2SJLuCv6qPT8d/257+vQLK69x4ymYJkkk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98176: drm/amdkfd: Avoid integer underflow with ffs in EOP ring size calc Date: Tue, 6 Oct 2026 10:44:37 +0200 Message-ID: <2026100632-CVE-2026-98176-8b1a@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2282; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0EJ7J82TsMjs+OILHurPibCtKs5SdVhf7taszgR0rCk=; b=kA0DAAIRMUfUDdst+ykByyZiAGrEtPChzR678pLl7Yt9RAIUk0g9885ppO5++gJf57eUwnByP ohdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmrEtPAACgkQMUfUDdst+ymOQACfVSju cF0uViM7QjhJi3qQo6t0uosAoIJmWO2Ex1ZHD5e9q83LE/6m4//0 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: Avoid integer underflow with ffs in EOP ring size calc The low 6 bits of cp_hqd_eop_control store the base-2 logarithm of the EOP ring size. This was calculated as ffs(q->eop_ring_buffer_size / sizeof(unsigned int)) - 1 - 1 But ffs can in theory return 1 or 0, so this could underflow (although in practice the ring buffer size cannot be less than 4096). Change this to ffs(q->eop_ring_buffer_size / sizeof(unsigned int) / 4) using properties of logarithms. (cherry picked from commit 4f18c56630383c14bfc6b2d65f88f2f895d2121a) The Linux kernel CVE team has assigned CVE-2026-98176 to this issue. Affected and fixed versions =========================== Fixed in 7.2.8 with commit 82e1b8299c6da02ce02185c208d2fdf7572b5ea1 Fixed in 7.3-rc4 with commit c883d0a132d430ef7ebb23fd94323be94d0fbdb8 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-2026-98176 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_mqd_manager_v10.c drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.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/82e1b8299c6da02ce02185c208d2fdf7572b5ea1 https://git.kernel.org/stable/c/c883d0a132d430ef7ebb23fd94323be94d0fbdb8