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 B6BAE37FF77 for ; Wed, 22 Apr 2026 13:55: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=1776866159; cv=none; b=Un5VKtqwjn7BmeENoIUdarJXULOSfl2zXwm3Rd6zUqGnlRzUombuW7HXg13M4L84pilsA7gdM8B4/VRwJ9wGqHleh4hBhhyqS0nMXhSE+tskBQdM+bk3e34jztz6AGBSxYSxymZW9yvQPgRIr37ZjNvyq7OeDCADANCaJulGnd4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776866159; c=relaxed/simple; bh=je31PmmAyXbIf2S9baLRnKFxOHOMfstl6uvS+q5tUO4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gAjneP5b9Q++K/aapbmjqeZ3jmLsRMRQdagmxirwR+Rgs8V/B70LprYnRXhMdzuCxKNj5EwqPpDtoAjQ22IiJJOxnncBBw4EmqQGckM46tV7zJSYQhWAkDRidCymgvR6OjwSast3GeMRKD7qzsqgVFlquRgvYzGwJJZpxkUIU/o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DZP4oNKN; 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="DZP4oNKN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D6B0C19425; Wed, 22 Apr 2026 13:55:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776866159; bh=je31PmmAyXbIf2S9baLRnKFxOHOMfstl6uvS+q5tUO4=; h=From:To:Cc:Subject:Date:Reply-To:From; b=DZP4oNKNnB9OXygnvsmxP5Tylk85FCyHnfIlzHi/8ARb5NOoMcRd5JUYGghirWmQW jnq2VreR15Pz0jd65UGcteu1Em7D6qII3OToCAyAO4XiavY7+zJqqlGiILw7qH+VMK hxJLT8GhRSodc4cjbwVFqFK13uo2AO+ENPnTuS/U= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31479: drm/xe: always keep track of remap prev/next Date: Wed, 22 Apr 2026 15:54:25 +0200 Message-ID: <2026042257-CVE-2026-31479-3a31@gregkh> X-Mailer: git-send-email 2.54.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=5627; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=pdHyJGdAsfwe2vexM6pXG+ir7ASIa89J5dYc25jA730=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkvLn3VuutvuZB7du3Hah438YnqhZkW3/88VlXg5HR8a C3kIHmtI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZyqohhwZplD6fGTOrxVg97 2ea3rPrwFRPhRQwzGS/+aLydciDwmdjdFaoOJ1XFshOWAgA= 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: always keep track of remap prev/next During 3D workload, user is reporting hitting: [ 413.361679] WARNING: drivers/gpu/drm/xe/xe_vm.c:1217 at vm_bind_ioctl_ops_unwind+0x1e2/0x2e0 [xe], CPU#7: vkd3d_queue/9925 [ 413.361944] CPU: 7 UID: 1000 PID: 9925 Comm: vkd3d_queue Kdump: loaded Not tainted 7.0.0-070000rc3-generic #202603090038 PREEMPT(lazy) [ 413.361949] RIP: 0010:vm_bind_ioctl_ops_unwind+0x1e2/0x2e0 [xe] [ 413.362074] RSP: 0018:ffffd4c25c3df930 EFLAGS: 00010282 [ 413.362077] RAX: 0000000000000000 RBX: ffff8f3ee817ed10 RCX: 0000000000000000 [ 413.362078] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 413.362079] RBP: ffffd4c25c3df980 R08: 0000000000000000 R09: 0000000000000000 [ 413.362081] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8f41fbf99380 [ 413.362082] R13: ffff8f3ee817e968 R14: 00000000ffffffef R15: ffff8f43d00bd380 [ 413.362083] FS: 00000001040ff6c0(0000) GS:ffff8f4696d89000(0000) knlGS:00000000330b0000 [ 413.362085] CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 [ 413.362086] CR2: 00007ddfc4747000 CR3: 00000002e6262005 CR4: 0000000000f72ef0 [ 413.362088] PKRU: 55555554 [ 413.362089] Call Trace: [ 413.362092] [ 413.362096] xe_vm_bind_ioctl+0xa9a/0xc60 [xe] Which seems to hint that the vma we are re-inserting for the ops unwind is either invalid or overlapping with something already inserted in the vm. It shouldn't be invalid since this is a re-insertion, so must have worked before. Leaving the likely culprit as something already placed where we want to insert the vma. Following from that, for the case where we do something like a rebind in the middle of a vma, and one or both mapped ends are already compatible, we skip doing the rebind of those vma and set next/prev to NULL. As well as then adjust the original unmap va range, to avoid unmapping the ends. However, if we trigger the unwind path, we end up with three va, with the two ends never being removed and the original va range in the middle still being the shrunken size. If this occurs, one failure mode is when another unwind op needs to interact with that range, which can happen with a vector of binds. For example, if we need to re-insert something in place of the original va. In this case the va is still the shrunken version, so when removing it and then doing a re-insert it can overlap with the ends, which were never removed, triggering a warning like above, plus leaving the vm in a bad state. With that, we need two things here: 1) Stop nuking the prev/next tracking for the skip cases. Instead relying on checking for skip prev/next, where needed. That way on the unwind path, we now correctly remove both ends. 2) Undo the unmap va shrinkage, on the unwind path. With the two ends now removed the unmap va should expand back to the original size again, before re-insertion. v2: - Update the explanation in the commit message, based on an actual IGT of triggering this issue, rather than conjecture. - Also undo the unmap shrinkage, for the skip case. With the two ends now removed, the original unmap va range should expand back to the original range. v3: - Track the old start/range separately. vma_size/start() uses the va info directly. (cherry picked from commit aec6969f75afbf4e01fd5fb5850ed3e9c27043ac) The Linux kernel CVE team has assigned CVE-2026-31479 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit 8f33b4f054fc29a4774d8d10116ef460faeb84a8 and fixed in 6.12.80 with commit ccd41f110c608b3cc347b9be881c3e72cd634b2b Issue introduced in 6.8 with commit 8f33b4f054fc29a4774d8d10116ef460faeb84a8 and fixed in 6.18.21 with commit 5eda8001ebb5269755608d678dd1f3928ab077c9 Issue introduced in 6.8 with commit 8f33b4f054fc29a4774d8d10116ef460faeb84a8 and fixed in 6.19.11 with commit e6ba1749549e87b83c0c4885d84b543687c3740e Issue introduced in 6.8 with commit 8f33b4f054fc29a4774d8d10116ef460faeb84a8 and fixed in 7.0 with commit bfe9e314d7574d1c5c851972e7aee342733819d2 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-31479 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_pt.c drivers/gpu/drm/xe/xe_vm.c drivers/gpu/drm/xe/xe_vm_types.h 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/ccd41f110c608b3cc347b9be881c3e72cd634b2b https://git.kernel.org/stable/c/5eda8001ebb5269755608d678dd1f3928ab077c9 https://git.kernel.org/stable/c/e6ba1749549e87b83c0c4885d84b543687c3740e https://git.kernel.org/stable/c/bfe9e314d7574d1c5c851972e7aee342733819d2