Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792758015; b=pXJ+mxxLNPxcgQvvm0vNZc/A8EOnRub/zss2v4y3NzYPT4u5rSMlP1A0ShzeTFbxrDpJ 7uHo2RoNPKcLF/wG2dHWAFhgayPq4CZpmVg0miQasYLPL2YEsCIKX74a22bbCstV+VJP1 dUK2ctYFa9Bptc1mT/AC5iiES1Iw1JBDWMhcuzXhGG4VXl36wMlnp8tUpAp7tAu9wqTIq C8MBC297BE7ZQqPSqA+Yxz+5foJOZJO9p29NwAbPfQIrcbtN7JU2rxuT3mFc/GuZZ1+mZ CQ+QSgkvr1My2+qoprdnyDVVcpaun5Qgxn3X0qHRGuw+3eASRbmIw2V89KVwB8b+nWA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792758015; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=gIqMG82eejI8SIf5Ej6eMKSOTufCyQ2fA+vG+8eOTFw=; b=Jj3jfPvYgiZFjWKiy5OhHfYisAz8fkMMVJa/ltmi9BFUFmJbpxmMwfZYG8vOQEsbYxhl 68VOXAibu6sBFqK3ZpUw7XncwZ0fEW3iiZI3ojWJ2tdAe/051lez9QKLe9dzhUnM9gt+8 s2UdwJhZYB0ZFL/PlB3zoppXyMs8+hFf7EGAAXxKf6DEYnM8aoY7CpkycWlGkVwSdVT1w uHq2TkgX9fzGWpzAnALO0039+kXICuZ4exgBo3UAu6S//VjXYZnc/OnwrkMd6IyuKG45O XURpvrR7aiN4xex40LeRjA+r8U6ZxmdeU255Dy893Eqv5EPABJkELYAjBIKKLxslB3A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=MksoPhm6; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7BC49606A324 for ; Fri, 23 Oct 2026 12:20:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=MksoPhm6 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 781EF1F01825; Fri, 23 Oct 2026 12:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792758015; bh=gIqMG82eejI8SIf5Ej6eMKSOTufCyQ2fA+vG+8eOTFw=; h=From:To:Cc:Subject:Date:Reply-To; b=MksoPhm6UcRTFPCA1zmYszUiVIVHZaXajlDv0KzQErj2gfPsUJvflOprdF7VZ25sm IBkLlwnaElhLhd1YUcQVHyRZWNmKZEKVCxLFEN3IUivMnj4Go+oIsb7WxOeh7FbKuJ VuCpqzhkGUOGj4oY74+gzMAPGXQsH5jKwp69TGuE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98919: drm/xe: harden adjust_idledly() against divide-by-zero and overflow Date: Fri, 23 Oct 2026 14:01:40 +0200 Message-ID: <2026102338-CVE-2026-98919-a29d@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4223; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/dHoui5qFSrabRVYiUjSV4wp5BaOIUEH5a3pZA5tmxY=; b=owGbwMvMwCRo6H6F97bub03G02pJDFm3fRaZJk5i252/46CWWWnAlZLD/H+FOv9JtrR8N9xm4 Ddt/dwLHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRgGaG+eWcs8/Ocn/JpGH6 OFchzt/86nXVJIb5FeLH2rWtpNX8thcdNOOZfmzBQcZrAA== 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/xe: harden adjust_idledly() against divide-by-zero and overflow adjust_idledly() has several corner-case issues flagged during review: 1. If xe_gt_clock_init() failed to recognise the crystal clock, gt->info.timestamp_base is 0, which makes idledly_units_ps also 0. The subsequent DIV_ROUND_CLOSEST(..., idledly_units_ps) is then a divide-by-zero and panics the kernel. 2. The tick-to-ns conversions are done in u32: idledly * idledly_units_ps, (maxcnt - 1) * 1000 Both overflow u32 before DIV_ROUND_CLOSEST() sees them. 3. If IDLE_WAIT_TIME reads back as 0, maxcnt evaluates to 0 and the maxcnt - 1 clamp wraps to 0xFFFFFFFF in u32. 4. The register only stores whole ticks, so the clamped ns value has to be converted to ticks and back. DIV_ROUND_CLOSEST() can round that conversion up past maxcnt: maxcnt = 640 ns, one tick = 666664 ps clamp: maxcnt - 1 = 639 ns ns -> ticks: 639000 / 666664 = 0.958 -> rounds to 1 tick tick -> ns: 1 * 666664 / 1000 = 667 ns 667 ns is programmed into RING_IDLEDLY, but 667 >= maxcnt (640), so xe_gt_WARN_ON() fires again on every subsequent init. Return early if timestamp_base is 0 (the unknown-crystal path). Do the conversions in u64 via the *_ULL() helpers so they cannot wrap. Clamp with a floor (DIV_ROUND_DOWN_ULL) so the programmed delay stays strictly below maxcnt, and guard the maxcnt == 0 case with a zero delay while still writing RING_IDLEDLY so INHIBIT_SWITCH_UNTIL_PREEMPTED is cleared. v2: Drop the redundant warn on the timestamp_base == 0 path; xe_gt_clock_init() already warns on an unrecognised crystal clock. Keep the early return to avoid the divide-by-zero. - Vinay v3: Field-mask the RING_IDLEDLY write with REG_FIELD_PREP(IDLE_DELAY, ...) instead of writing the raw tick count, which could clobber INHIBIT_SWITCH_UNTIL_PREEMPTED and reserved bits. Split the inhibit-switch clear from the maxcnt clamp so a set inhibit bit no longer forces a needless delay overwrite when the delay itself is already valid. Use gt_to_xe(gt) instead of gt_to_xe(hwe->gt). (cherry picked from commit d864065ea25e9d12897c175de9176ce46677e176) The Linux kernel CVE team has assigned CVE-2026-98919 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit d2de4410a88ffc6053300d03041cc73b8c85dbaf and fixed in 6.18.55 with commit 2bcbfc5e7bfa9cc76818c54db698da5bdc13d9ff Issue introduced in 6.15 with commit d2de4410a88ffc6053300d03041cc73b8c85dbaf and fixed in 7.2.9 with commit 531d4cd03118224022dc21ae25af052ce2a9e267 Issue introduced in 6.15 with commit d2de4410a88ffc6053300d03041cc73b8c85dbaf and fixed in 7.3 with commit 90f467577ebc28c5bc4ba2f0f1b83a4419fb0740 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-98919 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/xe/xe_hw_engine.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/2bcbfc5e7bfa9cc76818c54db698da5bdc13d9ff https://git.kernel.org/stable/c/531d4cd03118224022dc21ae25af052ce2a9e267 https://git.kernel.org/stable/c/90f467577ebc28c5bc4ba2f0f1b83a4419fb0740