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 61A931CF7A6 for ; Mon, 21 Oct 2024 19:40:00 +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=1729539600; cv=none; b=W4m8ACUPvAuLVyPi4dhkceHrGh2IOtWEV5W3EBZtvuMlnamq/82bV8TtbszF72cBy9slrRDMD++rqoaQ4dVuoQZrOPRF3wYLZ9N4lU0MdfkBejIkj+1roJMWTJWdwcfzPydBnEIB7yt2RUEJXfJUy2q9d0zwrTeUwNgyCZETQAQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729539600; c=relaxed/simple; bh=y4kfFGaBfIq2NEEJhnDyUj4wiGeYyj5zbB/2QvKiRuk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=JM53rpOBAxNUCd8WT9WfvS5pB7g68SaQsUvRGKvMu54LOE17MDN07y8yvHXkYyXNduulrxS2rUqaQLQUttEd/lUAcALr+xfo28RKtqeSJrX2cISkbF3ulMH8ZSohLKGy7nMJqaRrFW0Y5AB3aFy1dqcUjDHgO+9/wVks0jqudj0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AQJsq7mw; 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="AQJsq7mw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94C98C4CEC7; Mon, 21 Oct 2024 19:39:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729539600; bh=y4kfFGaBfIq2NEEJhnDyUj4wiGeYyj5zbB/2QvKiRuk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=AQJsq7mwJvb8EHkknr2MWoLhGPz/12bZLZ7aPB4TZr01GSs8jIDb/smh26FqE2wIj CueoQDT1re7/8uAQ6yudoMzDeokzt/FWS+A1f9Jy5U/VXvP/dRa7FOWNrV0PB1EsHI Gv0I42c16PoWQ1DuHHNWVRbxZdhH9pS8f+/cxwsE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50030: drm/xe/ct: prevent UAF in send_recv() Date: Mon, 21 Oct 2024 21:39:36 +0200 Message-ID: <2024102131-CVE-2024-50030-13ae@gregkh> X-Mailer: git-send-email 2.47.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2197; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=y4kfFGaBfIq2NEEJhnDyUj4wiGeYyj5zbB/2QvKiRuk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOliaz//tbqav3eJ+Jnmv15vFnQzSKhnG72OaHrj6SSfc WHTGZ2SjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIwEOG+em/366pLEldcT/l wK/LEpKOBo9vpDMsWH553+PG1t1thgv1tmwuk9te0B1wEQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: drm/xe/ct: prevent UAF in send_recv() Ensure we serialize with completion side to prevent UAF with fence going out of scope on the stack, since we have no clue if it will fire after the timeout before we can erase from the xa. Also we have some dependent loads and stores for which we need the correct ordering, and we lack the needed barriers. Fix this by grabbing the ct->lock after the wait, which is also held by the completion side. v2 (Badal): - Also print done after acquiring the lock and seeing timeout. (cherry picked from commit 52789ce35c55ccd30c4b67b9cc5b2af55e0122ea) The Linux kernel CVE team has assigned CVE-2024-50030 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit dd08ebf6c352 and fixed in 6.11.4 with commit 8ed7dd4c55e4 Issue introduced in 6.8 with commit dd08ebf6c352 and fixed in 6.12-rc3 with commit db7f92af6261 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-2024-50030 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_guc_ct.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/8ed7dd4c55e4fb21531a9645aeb66a30eaf43a46 https://git.kernel.org/stable/c/db7f92af626178ba59dbbcdd5dee9ec24a987a88