From mboxrd@z Thu Jan 1 00:00:00 1970 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=1796048672; b=qBDTvq4Y/wqRHbGof0SFr+c6KrpEazgySz2kaz/zRlYf+IQdBXImzKuQ8y2g/6b3LMTd 4muwX9O+qDQxWb3oI58DjMXNHyDwJsGj2WuDJ7ZU7rovmYGB7bAboDN0kraesNTTiOmjp 2b6e0WuTQ2VAQaYOgDCm3Mq7Spnltbkh23WaspM1wvvT6goupYRWgnwPhkwAUfbhcIgHm 3B7eC8LQJzsI4fTWZVHG0KmdAby/NL8javjjtnJ6f4KwK7Uv9KYakeqgjC2KIp6RskcwB 9gyXwoPJ8kGdJGEr/wb8ye0da4KZ5Z86TysKlm3U14Xt6D7Tc75VZIOIz2aTcAXofog== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796048672; 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=vWUSz0P8tqEIuA3qNg3wQZgpjIrla1kZCptHfRuvGdo=; b=of71NldSNjYVrF5uLVIdSIpqltIavsNx8fDa2Uta0HZ5Q0LGH6cgSrpZcZwFTwX1wzR6 R6MMqwqbbp8FTh1bSZ8Vu4d7fKdmch/xqRg0+2erZNSkAQ2w/1JqhsbNvNL2Z2kZ37tu1 lkzam6kD1TPXCfjS8wkDEMd9hML88drO6qBALWST9psI7k1YwjsBPba5YxoIthqTtNmYh 5GtxmcExaNp13/GPPVtJTbfPrEJ5wmqtdNaXlLog8v0NDfU04t0+pfxD+SPP2uH/z5dKZ fEF5915BtjOaA3gKopLjbRHmf8sZI4etAscDDMBuFEXW6yx4hYoqYlxdQcEEPrr2QiQ== 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=z5xRfGqv; 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 A3287606A325 for ; Mon, 30 Nov 2026 14:24:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=z5xRfGqv Received: by smtp.kernel.org (Postfix) with ESMTPSA id C77ED1F00927; Mon, 30 Nov 2026 14:24:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796048672; bh=vWUSz0P8tqEIuA3qNg3wQZgpjIrla1kZCptHfRuvGdo=; h=From:To:Cc:Subject:Date:Reply-To; b=z5xRfGqvHOf1UnuinjSf0ud4lNHZSQ+QYTs5WjBx680H9aaQhPcAlVosv7SHQnEGj eWy+utVMEVAGp5lnGiaG3Cn3yB/oGzmVsIHkCRQTzjC3Vt5logny+vMjL7Sw9ykCrm LOFkb3NJ/qXIY048Anj+junhaTTJj+FbOu7lyX+4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-139675: drm/amdgpu: reserve eviction-fence slot at WPTR caller Date: Mon, 30 Nov 2026 14:41:24 +0100 Message-ID: <2026113019-CVE-2026-139675-cee9@gregkh> X-Mailer: git-send-email 2.56.1 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=3595; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=kX3Ho4oO1xe9cJ6EuwLYR314N6Cxty9PAiXaih8kJPk=; b=owGbwMvMwCRo6H6F97bub03G02pJDNm81fLz33Wmtsu18824vzHia+u9qHTOVOff1k7mhzd/v aHYcEGpI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZSsoVhwfZ0/ZtfnE+7Lzx6 U0k4X+xO57d7UxkWHLzc651SoJW1/bzIpakFVzUPpLw/AAA= 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/amdgpu: reserve eviction-fence slot at WPTR caller Root cause analysis showed that the previous workaround was fixing the symptom in the wrong layer. Problem: kernel BUG at drivers/dma-buf/dma-resv.c:319! BUG_ON(fobj->num_fences >= fobj->max_fences) Workqueue: events amdgpu_userq_restore_worker - amdgpu_evf_mgr_attach_fence() had been temporarily taught to reserve/add fence bookkeeping internally as a workaround. - This hid the real contract violation and made reservation policy implicit inside a helper. Review clarification: - The helper-side dma_resv_add_fence-related workaround was only an intended proposal sent for review discussion, not the final direction. - Final fix keeps fence-slot reservation explicit in callers and leaves the helper free of policy decisions. Findings from investigation: - drm_exec_prepare_obj() both locks and reserves fence slots. - drm_exec_lock_obj() only locks and does not reserve slots. - Existing attach_fence callers in the GEM/userq restore flows already reserve TTM_NUM_MOVE_FENCES + 1 before adding the bookkeeping eviction fence. - The WPTR mapping path in mes_userq_create_wptr_mapping() used drm_exec_lock_obj() and then called amdgpu_evf_mgr_attach_fence(), so this specific path could add a fence without pre-reserved space. Fix: - Switch the WPTR mapping path to drm_exec_prepare_obj(..., TTM_NUM_MOVE_FENCES + 1), restoring the caller-side reservation contract. - Remove the helper-side reservation workaround from amdgpu_evf_mgr_attach_fence(). Why this is the right layer: - Reservation policy stays explicit at call sites that define how many fences may be added in that execution context. - The helper only performs validate + add_fence when called with a properly prepared reservation object, matching the existing drm_exec model. The Linux kernel CVE team has assigned CVE-2026-139675 to this issue. Affected and fixed versions =========================== Issue introduced in 7.3 with commit 7264bc10c7c657a54603c7fc058bf8e15f18ce12 and fixed in 7.3.6 with commit 6caf097214b892ef6e033c4a2795297a9633c338 Issue introduced in 7.3 with commit 7264bc10c7c657a54603c7fc058bf8e15f18ce12 and fixed in 7.4-rc1 with commit 5e6b21bce9d939b564e1f1c88a429cfa1fe66d3a 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-139675 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/amdgpu/mes_userqueue.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/6caf097214b892ef6e033c4a2795297a9633c338 https://git.kernel.org/stable/c/5e6b21bce9d939b564e1f1c88a429cfa1fe66d3a