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 CF15C30C17D for ; Wed, 24 Jun 2026 16:32:42 +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=1782318763; cv=none; b=DEGoP70Tj8ivruiL6EtsjJAirPlAoywJ9cR3P3FvjIzZ4wIwCNZMe8jjKVvUq8CoBQdrQhJFhcNNWqGVlJGPScumokcfK2KT6e73OkBR04tNzazoR5oFu7Hmu3gUTfmg70HNJfqbv9/xD9A/pQjCvQByvqGFz0bTcXQgnsJ+0ng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782318763; c=relaxed/simple; bh=doALbghZZyPzfPo7+9gsvKu0lh/TngA4p+3jXw0bEp8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=M6UhyB9QPOwBwqjqocpjUhSgePhn1EU9rD65m9rSfD+9iq/s++lXFQ5NiSgQ1NcQWUWQcjO1J2FSp8I9AOjPsC21nmN9HZYAI2rJjM4N95Zr9CvsAHxYfPBexc//VB+ogkS3Fhio22FHr0SRto+lR3oNZZmkdcgkf2cNM5N3OxY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KBnU1+8m; 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="KBnU1+8m" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3A6D1F000E9; Wed, 24 Jun 2026 16:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782318762; bh=q5DKbH7qbsba9rPVky93yck50xZBQp5art2Fk4y52cY=; h=From:To:Cc:Subject:Date:Reply-To; b=KBnU1+8mz7jYqQiw/IEks7IieCMDxa06WSbsVLqSb9G9VeWR9Ao2AZK/XOxtghCrG 7W1TlJ+LwLRB43XeDysPzp9bZaymSK22l1Yqy6/3EXyGUGLGzbnJqpoJDT5VLC2A/s /Ou+H4/3IxI8ia1kRAWfRtKIpzu7ym+VaG26pQGY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-52951: drm/xe/dma-buf: handle empty bo and UAF races Date: Wed, 24 Jun 2026 17:29:35 +0100 Message-ID: <2026062434-CVE-2026-52951-3211@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=3820; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ZjB+nf6izyCO73/SSxJqGZPKa43AC1ilTID/wAkl6/U=; b=owGbwMvMwCRo6H6F97bub03G02pJDFk2rO/+89V6l3Hf2bp4Uvex/V+X2Nis1I+OnPrlb1UsS z1f9mOrjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhImSjDgr3e/7ddmlmlcuC5 3rovRi+7w/NXP2WYK79M886NbYHeff8LhO7K8l3eXdj9EwA= 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/dma-buf: handle empty bo and UAF races There look to be some nasty races here when triggering the invalidate_mappings hook: 1) We do xe_bo_alloc() followed by the attach, before the actual full bo init step in xe_dma_buf_init_obj(). However the bo is visible on the attachments list after the attach. This is bad since exporter driver, say amdgpu, can at any time call back into our invalidate_mappings hook, with an empty/bogus bo, leading to potential bugs/crashes. 2) Similar to 1) but here we get a UAF, when the invalidate_mappings hook is triggered. For example, we get as far as xe_bo_init_locked() but this fails in some way. But here the bo will be freed on error, but we still have it attached from dma-buf pov, so if the invalidate_mappings is now triggered then the bo we access is gone and we trigger UAF and more bugs/crashes. To fix this, move the attach step until after we actually have a fully set up buffer object. Note that the bo is not published to userspace until later, so not sure what the comment "Don't publish the bo until we have a valid attachment", is referring to. We have at least two different customers reporting hitting a NULL ptr deref in evict_flags when importing something from amdgpu, followed by triggering the evict flow. Hit rate is also pretty low, which would hint at some kind of race, so something like 1) or 2) might explain this. v2: - Shuffle the order of the ops slightly (no functional change) - Improve the comment to better explain the ordering (Matt B) (cherry picked from commit af1f2ad0c59fe4e2f924c526f66e968289d77971) The Linux kernel CVE team has assigned CVE-2026-52951 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit dd08ebf6c3525a7ea2186e636df064ea47281987 and fixed in 6.12.91 with commit 9894731e513019df22a29e5c52f1c98890355ff1 Issue introduced in 6.8 with commit dd08ebf6c3525a7ea2186e636df064ea47281987 and fixed in 6.18.33 with commit 20a99ea1e2fd720856d6ba497ff26b82c604751f Issue introduced in 6.8 with commit dd08ebf6c3525a7ea2186e636df064ea47281987 and fixed in 7.0.10 with commit c473ae25421fddc3dde247ba7b85225b10641d09 Issue introduced in 6.8 with commit dd08ebf6c3525a7ea2186e636df064ea47281987 and fixed in 7.1 with commit 981bedbbe61364fcc3a3b87ebaf648a66cd07108 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-52951 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_dma_buf.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/9894731e513019df22a29e5c52f1c98890355ff1 https://git.kernel.org/stable/c/20a99ea1e2fd720856d6ba497ff26b82c604751f https://git.kernel.org/stable/c/c473ae25421fddc3dde247ba7b85225b10641d09 https://git.kernel.org/stable/c/981bedbbe61364fcc3a3b87ebaf648a66cd07108