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 D44DE1FA272 for ; Mon, 21 Oct 2024 18:05:52 +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=1729533952; cv=none; b=An6JWXeEMUBhmTLIsZYufB/Z6aysuf5vDQzK7CxvL/zeuGJ+6z4RZFW/IS1Pl9S63SJdMJkS9oIDd9511vN8hADEYn8IkMHIBtCNUseH/jAcryON8hahVpFOUftLTBs5uygcNLqxlHLdRIFYMa0euC04TBI3HtjjoDIwtgXdiAE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729533952; c=relaxed/simple; bh=BzVofVb2vSZlnGKgQtRLcJUeNaCZrXALDzwjMLAsr4w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RxgDZ40BLAErDb8c8FwFA6dN/UN1nBnWuI7n/ELkJ5apfwMeZTLHH1Yv3dknyeqioKGX1zdQaFEa8SEFsW7yfk0fiY7wNjJWidRFbY42JxTdUwreYYlimeTLa3S4+k+flKsaQaTckoD6b9u5F3WdDsvY6dl+iuoduoEMUSom+VQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BwuJo4LD; 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="BwuJo4LD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F21C5C4CEC7; Mon, 21 Oct 2024 18:05:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729533952; bh=BzVofVb2vSZlnGKgQtRLcJUeNaCZrXALDzwjMLAsr4w=; h=From:To:Cc:Subject:Date:Reply-to:From; b=BwuJo4LDi9N0vLoc9T7+lMDNZJwV5CoBHFeCoIhUXy2f5EFK7YeJOULKC+LqT4m+I xDvoSasf99hmAuPNKlfW99A2sN6OmEZ2G3v3WRydVhVKZdifLhCkOozeFSIbHCm3ss EKkDyCCcOYZQXO1vJVjoydPK0SwvVHDkAcmBqUMw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-49943: drm/xe/guc_submit: add missing locking in wedged_fini Date: Mon, 21 Oct 2024 20:02:31 +0200 Message-ID: <2024102128-CVE-2024-49943-f733@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=2145; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=BzVofVb2vSZlnGKgQtRLcJUeNaCZrXALDzwjMLAsr4w=; b=kA0DAAIRMUfUDdst+ykByyZiAGcWlvjIhrPQ1PGgNXpeZG66hOSDX5NB/x384Mnd1jlH2e3fX ohdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmcWlvgACgkQMUfUDdst+ymOYACfbpOo bmLa0AWSayqUK7s+RX3GUmYAmwZUY7e9tykeFaMUDnCmNvQfXxj0 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/guc_submit: add missing locking in wedged_fini Any non-wedged queue can have a zero refcount here and can be running concurrently with an async queue destroy, therefore dereferencing the queue ptr to check wedge status after the lookup can trigger UAF if queue is not wedged. Fix this by keeping the submission_state lock held around the check to postpone the free and make the check safe, before dropping again around the put() to avoid the deadlock. (cherry picked from commit d28af0b6b9580b9f90c265a7da0315b0ad20bbfd) The Linux kernel CVE team has assigned CVE-2024-49943 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit 8ed9aaae39f3 and fixed in 6.11.3 with commit d88f9bab7e62 Issue introduced in 6.11 with commit 8ed9aaae39f3 and fixed in 6.12-rc2 with commit 790533e44bfc 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-49943 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_submit.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/d88f9bab7e62dd0dbe983fa70cf040042a60cc84 https://git.kernel.org/stable/c/790533e44bfc7af929842fccd9674c9f424d4627