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 1F73D17107F for ; Fri, 21 Jun 2024 10:24:54 +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=1718965495; cv=none; b=rYoKElBHAPky7NN3JdfhcEgu2dikctmjAWz7958w83FPFq7O5IVfTHcKm5rDUnK0bGU4VOUFxPws7zZSL863fUB7lLcOBCXMuuCGm/CC/Aq4hmbMYPgBaiwlMesM5OOIy6C9rxUjIYoyXsE/s2SKwAWv2iEufwyNCd8/6AlzxXE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718965495; c=relaxed/simple; bh=FP9bWMX+eVc4XmCoBG4KIXGTqDSwnfKTo0wOVX0LPGg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HO77E89SYAvuuQeIC6DD/fDIvqXsqBm5XVJ2swn2May7d6md/GteJLaYLvXWLqXzCUtQxfECRdofHcrYkX/0QH6GE3XpryWaWS0q+NyMk+BT7juatZbZ+M5rQPIWhJXriTe15rHHQ56z5ni8x0hpvrTVM0DOgGrVsRqAd1yLLB8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=q6bm1+Ta; 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="q6bm1+Ta" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B82AC2BBFC; Fri, 21 Jun 2024 10:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718965494; bh=FP9bWMX+eVc4XmCoBG4KIXGTqDSwnfKTo0wOVX0LPGg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=q6bm1+TastpcS1jksXrQ3zziRc7Pd38jM0o3kJMdmymUkQy5/zLd37QaZXSSVTw2U /QJgth7NGDMOUB9fTBy2O67iJVkII7zXdP9yFC6kUcKFNZ+PLK7fnMW3QAZA9QjV3k BbOGK8Yrg+1RantsCcAdk96s2cR65y6JnvTTVUts= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-38629: dmaengine: idxd: Avoid unnecessary destruction of file_ida Date: Fri, 21 Jun 2024 12:19:55 +0200 Message-ID: <2024062141-CVE-2024-38629-47c6@gregkh> X-Mailer: git-send-email 2.45.2 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=2315; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=FP9bWMX+eVc4XmCoBG4KIXGTqDSwnfKTo0wOVX0LPGg=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmlwXvdX1UJ1VbeW/qq6N2v2D37nx+9sOD8J40Vd3xne V/8H/OQoSOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAm0vSGYcEeteOKKjs8tJgs FZ+cCQy+uWzpskyGuUJhM+yj9/qkF614Lt/+OuHia4ep7wA= 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: dmaengine: idxd: Avoid unnecessary destruction of file_ida file_ida is allocated during cdev open and is freed accordingly during cdev release. This sequence is guaranteed by driver file operations. Therefore, there is no need to destroy an already empty file_ida when the WQ cdev is removed. Worse, ida_free() in cdev release may happen after destruction of file_ida per WQ cdev. This can lead to accessing an id in file_ida after it has been destroyed, resulting in a kernel panic. Remove ida_destroy(&file_ida) to address these issues. The Linux kernel CVE team has assigned CVE-2024-38629 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit e6fd6d7e5f0f and fixed in 6.6.33 with commit 9eb15f24a0b9 Issue introduced in 6.4 with commit e6fd6d7e5f0f and fixed in 6.9.4 with commit 15edb906211b Issue introduced in 6.4 with commit e6fd6d7e5f0f and fixed in 6.10-rc1 with commit 76e43fa6a456 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-38629 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/dma/idxd/cdev.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/9eb15f24a0b9b017b39cde8b8c07243676b63687 https://git.kernel.org/stable/c/15edb906211bf53e7b5574f7326ab734d6bff4f9 https://git.kernel.org/stable/c/76e43fa6a456787bad31b8d0daeabda27351a480