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 3769132D5B6 for ; Wed, 17 Sep 2025 14:58:35 +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=1758121116; cv=none; b=tripvQCoYc0IvG31vK20TPWzkt3QB4PlIJj0QYK2tZs3KBiPBBbgYlIQ4e+fLbXdVjM9Vg2dS5/qEJ3vVu8ikLoI5YPLvqSQLIZSyBgac8E5spawXjVFY+LuNyQKPvUm9iAvGSCVfEVhPablfRJvCilVKwaHL9MUQJRdQec6JH8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758121116; c=relaxed/simple; bh=1KNkMqaAenc4UazuUZwol0mZBz4lihs7oRqvXotD1WI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dp6ngnt0WPDMgL8/HgEFBag0/x5TZfKo6BiPcxRgBB6dd57yDAtefVBrxzdRss4NTp2uNPq8EiUP5+H8fxtvlBLVqmSDwSvMmp9boUmtV6VwxpBIWzA/51l8xjctBDw0JttbBxx/X9FzN6qF9U5wB1iqZbVUUYWfe8QWW1BFVu0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=om5iZTmB; 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="om5iZTmB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65FD2C4CEE7; Wed, 17 Sep 2025 14:58:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758121115; bh=1KNkMqaAenc4UazuUZwol0mZBz4lihs7oRqvXotD1WI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=om5iZTmBH2/IagYzXKaDngqVtk79Wapwv5S0TkjFA8I9/6uT5iEl0M4ojuRV9cjCt zHRYoBqC9vKvTPX0EYSC5TwrKdtwuICFWg1N6CeG9h3w9YIqsUZd0AxM17KJl7dx4o hODqW4M416lzEDTpmNQ+RJ7uvGOSnkKXQOkjZ/tE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53353: accel/habanalabs: postpone mem_mgr IDR destruction to hpriv_release() Date: Wed, 17 Sep 2025 16:56:52 +0200 Message-ID: <2025091720-CVE-2023-53353-2611@gregkh> X-Mailer: git-send-email 2.51.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=2256; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=n3LzgX++2XsoKIwtpd2iLBON02CKyWwEkX9pH7ypVR8=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmnzog+kzv0nIHxzwqPmZPExNbLVl69+/eig8HtGN9Dk QpZ/xKrOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiGkwM89SqP747tSznyy2x tNniEambjql5czDMD3R4uWp9VUGD8cWWFSWpQpryNyOYAQ== 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/habanalabs: postpone mem_mgr IDR destruction to hpriv_release() The memory manager IDR is currently destroyed when user releases the file descriptor. However, at this point the user context might be still held, and memory buffers might be still in use. Later on, calls to release those buffers will fail due to not finding their handles in the IDR, leading to a memory leak. To avoid this leak, split the IDR destruction from the memory manager fini, and postpone it to hpriv_release() when there is no user context and no buffers are used. The Linux kernel CVE team has assigned CVE-2023-53353 to this issue. Affected and fixed versions =========================== Fixed in 6.3.4 with commit 840de329ca99cafd0cdde9c6ac160b1330942aba Fixed in 6.4 with commit 2e8e9a895c4589f124a37fc84d123b5114406e94 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-2023-53353 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/habanalabs/common/device.c drivers/accel/habanalabs/common/habanalabs.h drivers/accel/habanalabs/common/habanalabs_drv.c drivers/accel/habanalabs/common/memory_mgr.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/840de329ca99cafd0cdde9c6ac160b1330942aba https://git.kernel.org/stable/c/2e8e9a895c4589f124a37fc84d123b5114406e94