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 DE62E255E34 for ; Tue, 20 May 2025 15:22:42 +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=1747754563; cv=none; b=AbPAsQsmSW78msPv3wSvoqRW+5c1wTPgfm1wEMHKYujzTj4r4EvDxtdjKpwolpr/yiRnjAPQI7WHssv1TzZZcluoCpkjsoZZ8VXpNiPEWKqKqSr9fm3KAO5BNq2yrEZ/q818p/FlY10Z1fshlmanLrwFhMIGJI5qj4WFHSAQBEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747754563; c=relaxed/simple; bh=EEKDmGS23b1ZBKEvbvwvFCoKw2XlJedfhxpc+2y7XPc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uqOCB1o/pQ7+D9o5FWa364E7kxLQjoSbQ45YglQwIclpwNGvs5gRmH98h9KtmnFMThqlXz6upgypcgzWPJXzxIALxk5Ta7QCy3VsRH4BIavSak3Nj0c2TrL/U7M07lsznYN4grZFdiO1eSfVUZ2/wPCBOROlXUOUx/gq1p1kE9M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TpgjdMlR; 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="TpgjdMlR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD393C4CEE9; Tue, 20 May 2025 15:22:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747754562; bh=EEKDmGS23b1ZBKEvbvwvFCoKw2XlJedfhxpc+2y7XPc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=TpgjdMlRMRoay/K9+cG4h13OP4abLp9iMwkn1Nb7u1ilBFxrsopmy6+3wTWg0J/+B 4Qz5bm4O1Z3fXFefnlLqG45HnFLAQ9IaVGtVaRfcf/aK42eeTAbtIWrgTo8xDF1BMz T4brQRsp6Tr05kFzNk9OE1VLRMWKrDHlscTZrf5U= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37907: accel/ivpu: Fix locking order in ivpu_job_submit Date: Tue, 20 May 2025 17:22:04 +0200 Message-ID: <2025052057-CVE-2025-37907-7b62@gregkh> X-Mailer: git-send-email 2.49.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=2822; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=GKANOEX9E50B4B0sGkjn9SpZD9iCEy0x7FjFMIK9UuQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk688S273fJXVTFbaKXk9RwilfKWPBogl31r6Y78+4e+ BcU7n23I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACaSv45hwTypresf1E9xXzpV 9vUBka16Ltd/SzLMFWE57125vZv3+Kz0QJ4VdVebX9f0AAA= 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: accel/ivpu: Fix locking order in ivpu_job_submit Fix deadlock in job submission and abort handling. When a thread aborts currently executing jobs due to a fault, it first locks the global lock protecting submitted_jobs (#1). After the last job is destroyed, it proceeds to release the related context and locks file_priv (#2). Meanwhile, in the job submission thread, the file_priv lock (#2) is taken first, and then the submitted_jobs lock (#1) is obtained when a job is added to the submitted jobs list. CPU0 CPU1 ---- ---- (for example due to a fault) (jobs submissions keep coming) lock(&vdev->submitted_jobs_lock) #1 ivpu_jobs_abort_all() job_destroy() lock(&file_priv->lock) #2 lock(&vdev->submitted_jobs_lock) #1 file_priv_release() lock(&vdev->context_list_lock) lock(&file_priv->lock) #2 This order of locking causes a deadlock. To resolve this issue, change the order of locking in ivpu_job_submit(). The Linux kernel CVE team has assigned CVE-2025-37907 to this issue. Affected and fixed versions =========================== Fixed in 6.12.28 with commit 079d2622f8c9e0c380149645fff21d35c59ce6ff Fixed in 6.14.6 with commit b9b70924a272c2d72023306bc56f521c056212ee Fixed in 6.15-rc1 with commit ab680dc6c78aa035e944ecc8c48a1caab9f39924 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-2025-37907 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/accel/ivpu/ivpu_job.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/079d2622f8c9e0c380149645fff21d35c59ce6ff https://git.kernel.org/stable/c/b9b70924a272c2d72023306bc56f521c056212ee https://git.kernel.org/stable/c/ab680dc6c78aa035e944ecc8c48a1caab9f39924