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 AB30B2FE064 for ; Tue, 19 Aug 2025 17:21:11 +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=1755624071; cv=none; b=B9+cEkjGwu49yb8PfGZ9JA9ZaGwjxdNLzwaVByX9uo6vewnmduYG/l5kX6qyvsgXsMNgSEtCJBdC/q2H6ovryAjqixwknRBSLVgVFb7iT0IFKE/AEhXfjjun9lqtv865ZfqHFoYnz/OzVvz/DakKawe6HpbhabkUs64nvszQmBk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755624071; c=relaxed/simple; bh=3sW42Pw7w6eQ+YivjOsJiUaNK/CjDVi5aIttdLng/ks=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=JrhMtzc2mQWj7YzEhComU+c9aB9oLZ11K+7KSORavzHGI8xBk9cEBsZ5k3yXbfoKz21a2kH9tHrvqYqHtpT/aYitSZgxapNlUDlnn3cQMv7NiOm+WHYbHKIX0bPKLrA3a3t5wOxeE4T7woVVWv5ENW6Dfo/HEF/iFXPYYOPkkxg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DyT8CKn9; 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="DyT8CKn9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A798EC4CEF1; Tue, 19 Aug 2025 17:21:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755624071; bh=3sW42Pw7w6eQ+YivjOsJiUaNK/CjDVi5aIttdLng/ks=; h=From:To:Cc:Subject:Date:Reply-to:From; b=DyT8CKn9vcAVVWnnAAFD8GdXhn+jDw+6z8bbJcYGYEkl3fzYnaiX1qoyX2HB9GWvw d9N/u0cihJjgSO26N75Rt0Z6lIP6TPbvRQDSnjt+K1b+1CnXNgKPTf5Iu1x9334/5j Z/Udy5qU/hWZaQFB3QqU643mhJU84izFerS0oJOQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38596: drm/panthor: Fix UAF in panthor_gem_create_with_handle() debugfs code Date: Tue, 19 Aug 2025 19:18:42 +0200 Message-ID: <2025081919-CVE-2025-38596-9c29@gregkh> X-Mailer: git-send-email 2.50.1 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=2535; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=gudyEt3nyBHDeM01J7BUIy0DlRJCM8I8P7632KcZhwg=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlLNt5u+vrUvHdO32vBb9mTmj5Mv63wKYTjrqCvm9b+K Pe9T83DO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiCW8Y5gq2Hp1Tta/y9DrH ybnfA2Kfvfb1EWWYX+sncf9A8uwpSu/+zeR+qujzaNbBUAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: drm/panthor: Fix UAF in panthor_gem_create_with_handle() debugfs code The object is potentially already gone after the drm_gem_object_put(). In general the object should be fully constructed before calling drm_gem_handle_create(), except the debugfs tracking uses a separate lock and list and separate flag to denotate whether the object is actually initialized. Since I'm touching this all anyway simplify this by only adding the object to the debugfs when it's ready for that, which allows us to delete that separate flag. panthor_gem_debugfs_bo_rm() already checks whether we've actually been added to the list or this is some error path cleanup. v2: Fix build issues for !CONFIG_DEBUGFS (Adrián) v3: Add linebreak and remove outdated comment (Liviu) The Linux kernel CVE team has assigned CVE-2025-38596 to this issue. Affected and fixed versions =========================== Issue introduced in 6.16 with commit a3707f53eb3f4f3e7a30d720be0885f813d649bb and fixed in 6.16.1 with commit 5f2be12442db6a2904e6e31b0e3b5ad5aebf868b Issue introduced in 6.16 with commit a3707f53eb3f4f3e7a30d720be0885f813d649bb and fixed in 6.17-rc1 with commit fe69a391808404977b1f002a6e7447de3de7a88e 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-38596 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/panthor/panthor_gem.c drivers/gpu/drm/panthor/panthor_gem.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/5f2be12442db6a2904e6e31b0e3b5ad5aebf868b https://git.kernel.org/stable/c/fe69a391808404977b1f002a6e7447de3de7a88e