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 354344FDE58 for ; Wed, 16 Sep 2026 10:45:39 +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=1789555584; cv=none; b=oEiBy7bezbEPQZr2lo8tDc4TTTSpGmyBmeax3D/o6KG+JIXTtcLMY4gz29i8Byij3jdPB8CQsfN8ZIxDuA6+LcIHIVMGvSupo7wffH0AQw5KXZyUBCBd7zSm+Gbcz3yz7k95uNs4zq4hEOaCsr8kOEetV6gAM/LDx1ECrlk0Ues= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789555584; c=relaxed/simple; bh=bTxAzT5++21iH1ZZhXecsa3eddTO1pIeWSo9NL3cbcI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XqaJs29HkXkldxtuLrOUQ6QeEueJacuexcEbhpZI2Jr3Mrf+84HMwhKe/hxNQ31EGoVuJ4oVPQ1fsXqaUHP5gw6EP+VYvVeD3ZPk35rsXJbt9Du/vArEcEUu4s0tjUFy99i2p1rHbW/E6Yfe9HnEPZzBTXE9dNJtMJY8Qdhx1BA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sJmroyHG; 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="sJmroyHG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFA5B1F0089C; Wed, 16 Sep 2026 10:45:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789555535; bh=jB92BZkESxmXlZy+cqy+lGEavqjvlP5OK6aFDc/3qj4=; h=From:To:Cc:Subject:Date:Reply-To; b=sJmroyHGI7aLg4ln73pGg4Nth1ETfLjq+7blVehsiDIQGfwoByDywM20HfUa986eU lmczaEI5QL2pz0gAGQLUUsOG9COWUc7RtdbkeUWUmUiOVD7pMXKOqTrEYYBVrVhKyM wo744rYtdgtAtalxxmtXEmXIBO1B82j95volYOYk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-90047: drm/xe: Don't hand out the flat CCS storage as usable VRAM Date: Wed, 16 Sep 2026 11:32:57 +0100 Message-ID: <2026091609-CVE-2026-90047-d996@gregkh> X-Mailer: git-send-email 2.55.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=4921; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9L54CjtMepLWs91q3el3YqSVbOLKdhtKz+BZXOJLE1g=; b=owGbwMvMwCRo6H6F97bub03G02pJDFmr8jfmMD15ekRe/kvG989z5v9cUHfQxH8Pb1LM3oDXC 4UKOsJ1O2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi8jkM8zRcZnxyYkzp3pbz UWXK+0D1mVm7LBjmmRRNFOw+seWwrPa8/kfPF/6fckH/PgA= 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: Don't hand out the flat CCS storage as usable VRAM get_flat_ccs_offset() reads the base of the flat CCS storage from the hardware, scales it by the number of enabled L3 nodes, and rounds the result up to 128K. Everything below that offset is then handed to the VRAM allocator as usable memory. Rounding a limit that means "usable memory ends here" upwards publishes whatever lies between the real base and the rounded one as free memory, and that memory belongs to the compression hardware. The scaled value has no reason to be 128K aligned, and on a Battlemage G21 with 16 GiB it is not: flat CCS base: raw 0x3fafff800, rounded 0x3fb000000 so the last 2 KiB of page 0x3fafff000 is CCS storage, in the allocator's pool. Whatever is allocated there gets that tail overwritten by the compression hardware, which needs no page-table entry, no buffer object and no GPU submission to do it, and does it before userspace exists. On this machine a Mesa VM's level-3 page table landed on that page on every cold boot. It lost the entry covering the compositor's batch-buffer heap, so the compositor's first submission faulted fetching its batch and gdm restarted it forever: a black screen on an otherwise working machine. Restarting gdm cleared it because the next VM's page tables were allocated somewhere else. Round down instead, to the page size the allocator works in. On this machine that excludes exactly one page. Reading the reserved page afterwards shows what had been writing it: [369] 0xcccc000000000000 [371] 0xcc77000000000000 [373] 0xcccc000000000000 [375] 0xcc77000000000000 compression metadata, two bytes per sixteen, sitting where the driver used to hand out memory. The assertion that should have caught this compares the offset against GSMBASE - ccs_size for equality. That value is 128K aligned, so it agrees with the rounded-up offset precisely when the base is not aligned - the check cannot fail in the case it exists to catch, and is compiled out unless CONFIG_DRM_XE_DEBUG is set. Replace it with one that can fail: CCS storage must not run into GSM. [ And this was a debug session from hell, enormously helped by an AI doing much of the grunt-work. I'd like to call it my tireless helper, but the AI several times stated flat out that this was impossible and unsolvable and that we should just write a report about it. I suspect those things have been trained by people who may not be quite as stubborn as I am. But while the AI was ready to give up several times, it did keep adding debug code and analyzing it faithfully when I pushed. So credit where credit is due and I let the AI write the commit message above. This is basically a one-liner fixing a bogus "round_up()" to a "round_down()", but there were 24 patches adding more and more debug information to this, and 18 kernel boot to finally narrow it down to this. - Linus ] The Linux kernel CVE team has assigned CVE-2026-90047 to this issue. Affected and fixed versions =========================== Issue introduced in 6.13 with commit 37173392741c425191b959acb3adf70c9a4610c0 and fixed in 6.18.51 with commit c96477e0cabf55bfbdf078078e9de1c8024f8060 Issue introduced in 6.13 with commit 37173392741c425191b959acb3adf70c9a4610c0 and fixed in 7.2.5 with commit 348c3db4f1520d36764ac8cae2492f50599714f6 Issue introduced in 6.13 with commit 37173392741c425191b959acb3adf70c9a4610c0 and fixed in 7.3-rc1 with commit 818bebeb63dd6bf5f4e07e145f6cdbace520a34c 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-90047 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_vram.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/c96477e0cabf55bfbdf078078e9de1c8024f8060 https://git.kernel.org/stable/c/348c3db4f1520d36764ac8cae2492f50599714f6 https://git.kernel.org/stable/c/818bebeb63dd6bf5f4e07e145f6cdbace520a34c