From mboxrd@z Thu Jan 1 00:00:00 1970 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 BBE851EF09F for ; Mon, 21 Oct 2024 18:02:44 +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=1729533764; cv=none; b=aCxaBVRlJcuWBZY0HGyc29E2t6iEsrQhCJZoEMFWR+/unm0M5Sua3w3Zfd/TokepYK7uOCYrbNZ3v6SeJTxJfN0VoJ+FOO3nOAuGOCn/TBzhzD/KlFwQp5Q4cRqAkUfb3TzkaCwA7DoIwT4FMSHgVbNw2wS1X45q/av257vU8p0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729533764; c=relaxed/simple; bh=Z27jR26C6Y/SU4ULbv+ahvfkiwSTpjNF0OMGUR+eojY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=CkXugJOQsf8BRB93XVQE2pcVGZGmiMEROjx191X6XSTC93LB7jiHszgH8Z2kePbsf9Icwxcywbzsb0fUsix2qXxbfdwjlvw07EhNEqfdFVWDXiNn6JILyIiOeIoJ3s/4pft0IkKShbpssTAKmc4hjVCLi+e7pmoOvwjRc4H12tw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jNTw/UId; 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="jNTw/UId" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1D72C4CEED; Mon, 21 Oct 2024 18:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729533764; bh=Z27jR26C6Y/SU4ULbv+ahvfkiwSTpjNF0OMGUR+eojY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=jNTw/UId5YfWpX0ufl6/YKvfXMCpH9kmtLyopAfuq+2rFb0jx7y4nABz6z4Q0mYHS rjSk3TamZ7+zm8SoyE7MbaOa+n715Oi5FF2aLHTvcWM5ar3trfXvBYa+nn2DRhQE3q telTBs1Fpe9V73ye+ij0X2y1qL4spH8z0Bl6ARfI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-49876: drm/xe: fix UAF around queue destruction Date: Mon, 21 Oct 2024 20:01:24 +0200 Message-ID: <2024102115-CVE-2024-49876-7fe2@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=2557; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Z27jR26C6Y/SU4ULbv+ahvfkiwSTpjNF0OMGUR+eojY=; b=owGbwMvMwCRo6H6F97bub03G02pJDOli017L9SRo2KZ/OXPxXMGSUCZPTqnbrxg6/pXX9ly6G dx1MtOjI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYiH8qw4IzVyhdbtt783rme d7rjpZPK5lcWqTPML33Fu3KCyzzrEo2VvhKNpQcSf63wBgA= 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: fix UAF around queue destruction We currently do stuff like queuing the final destruction step on a random system wq, which will outlive the driver instance. With bad timing we can teardown the driver with one or more work workqueue still being alive leading to various UAF splats. Add a fini step to ensure user queues are properly torn down. At this point GuC should already be nuked so queue itself should no longer be referenced from hw pov. v2 (Matt B) - Looks much safer to use a waitqueue and then just wait for the xa_array to become empty before triggering the drain. (cherry picked from commit 861108666cc0e999cffeab6aff17b662e68774e3) The Linux kernel CVE team has assigned CVE-2024-49876 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit dd08ebf6c352 and fixed in 6.10.14 with commit 272b0e788745 Issue introduced in 6.8 with commit dd08ebf6c352 and fixed in 6.11.3 with commit 421c74670b0f Issue introduced in 6.8 with commit dd08ebf6c352 and fixed in 6.12-rc2 with commit 2d2be279f1ca 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-49876 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_device.c drivers/gpu/drm/xe/xe_device_types.h drivers/gpu/drm/xe/xe_guc_submit.c drivers/gpu/drm/xe/xe_guc_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/272b0e78874586d6ccae04079d75b27b47705544 https://git.kernel.org/stable/c/421c74670b0f9d5c007f1276d3647aa58f407fde https://git.kernel.org/stable/c/2d2be279f1ca9e7288282d4214f16eea8a727cdb