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 D48393D6F for ; Thu, 1 May 2025 12:58:30 +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=1746104310; cv=none; b=Aq1gRbMU5oPmmLBnc7Mgv1jqVSAVncw+0dtX7zq2Zfhd3/ZtAJ/r8KBU/znpc5D5eVJFzmEV8eLFFwyED1oFz9lvRNgSBCxV2U0axVr6ag5v0GxMrWC//sM39wKJsqUz4ZlgYHJeYTV7tJxMA41kLuiWOe5rHC9m0GKiV14ZvC8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746104310; c=relaxed/simple; bh=zZ+ZniBOHLz3gsd/djW58ZrAjtkyPUbcbSJyo/Zv1HA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EGWOOaXlNAG6R28JyH4jAowf4DWP29Z2B0vGUVQjTYMX2jaZZMy3tTJkjSBKM2v5i0AqiREQp8YFTVjaRQyIl7AQZ+Hfxqffu05nmeqT2dpN5R+hGUO1G77AvZ/rZeM8E7HaU6QCbWkOjZukm2z8HZ39agfOb9Y5Rz3vXfFw9ko= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=olHcxJpq; 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="olHcxJpq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C3E4C4CEE3; Thu, 1 May 2025 12:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746104310; bh=zZ+ZniBOHLz3gsd/djW58ZrAjtkyPUbcbSJyo/Zv1HA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=olHcxJpq03pzYOZFQc1fqojvNisCAdzJVmkh1g3xP+sSk5Z36etjZGkQ9jhTQllfb VnN+O6tYc0TUYDZ2NisdfWORhDIoaQ/deqdfu2Yh4+oa36ShWidviYyc1eec9skeGK BXpA5IBM0Fs2r6qlVRBNkVT+41g4ggV6rQGS2xuI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37754: drm/i915/huc: Fix fence not released on early probe errors Date: Thu, 1 May 2025 14:57:00 +0200 Message-ID: <2025050138-CVE-2025-37754-47b2@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=5488; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ed1Ja/GolzlA6n2xTmUOTLm8K5yC1igUTBqrTi3X+g0=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnC+W3Tl5T9XWHaurj5vnQjX+GBbef2agWoMQjNquq5N Vt807o1HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRXeEM810T92yIYPcXfMHt 0qNdzfBl/QMrJoYFuw6/1uud+bMq+fTBshXRm8TirspxAwA= 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: drm/i915/huc: Fix fence not released on early probe errors HuC delayed loading fence, introduced with commit 27536e03271da ("drm/i915/huc: track delayed HuC load with a fence"), is registered with object tracker early on driver probe but unregistered only from driver remove, which is not called on early probe errors. Since its memory is allocated under devres, then released anyway, it may happen to be allocated again to the fence and reused on future driver probes, resulting in kernel warnings that taint the kernel: <4> [309.731371] ------------[ cut here ]------------ <3> [309.731373] ODEBUG: init destroyed (active state 0) object: ffff88813d7dd2e0 object type: i915_sw_fence hint: sw_fence_dummy_notify+0x0/0x20 [i915] <4> [309.731575] WARNING: CPU: 2 PID: 3161 at lib/debugobjects.c:612 debug_print_object+0x93/0xf0 ... <4> [309.731693] CPU: 2 UID: 0 PID: 3161 Comm: i915_module_loa Tainted: G U 6.14.0-CI_DRM_16362-gf0fd77956987+ #1 ... <4> [309.731700] RIP: 0010:debug_print_object+0x93/0xf0 ... <4> [309.731728] Call Trace: <4> [309.731730] ... <4> [309.731949] __debug_object_init+0x17b/0x1c0 <4> [309.731957] debug_object_init+0x34/0x50 <4> [309.732126] __i915_sw_fence_init+0x34/0x60 [i915] <4> [309.732256] intel_huc_init_early+0x4b/0x1d0 [i915] <4> [309.732468] intel_uc_init_early+0x61/0x680 [i915] <4> [309.732667] intel_gt_common_init_early+0x105/0x130 [i915] <4> [309.732804] intel_root_gt_init_early+0x63/0x80 [i915] <4> [309.732938] i915_driver_probe+0x1fa/0xeb0 [i915] <4> [309.733075] i915_pci_probe+0xe6/0x220 [i915] <4> [309.733198] local_pci_probe+0x44/0xb0 <4> [309.733203] pci_device_probe+0xf4/0x270 <4> [309.733209] really_probe+0xee/0x3c0 <4> [309.733215] __driver_probe_device+0x8c/0x180 <4> [309.733219] driver_probe_device+0x24/0xd0 <4> [309.733223] __driver_attach+0x10f/0x220 <4> [309.733230] bus_for_each_dev+0x7d/0xe0 <4> [309.733236] driver_attach+0x1e/0x30 <4> [309.733239] bus_add_driver+0x151/0x290 <4> [309.733244] driver_register+0x5e/0x130 <4> [309.733247] __pci_register_driver+0x7d/0x90 <4> [309.733251] i915_pci_register_driver+0x23/0x30 [i915] <4> [309.733413] i915_init+0x34/0x120 [i915] <4> [309.733655] do_one_initcall+0x62/0x3f0 <4> [309.733667] do_init_module+0x97/0x2a0 <4> [309.733671] load_module+0x25ff/0x2890 <4> [309.733688] init_module_from_file+0x97/0xe0 <4> [309.733701] idempotent_init_module+0x118/0x330 <4> [309.733711] __x64_sys_finit_module+0x77/0x100 <4> [309.733715] x64_sys_call+0x1f37/0x2650 <4> [309.733719] do_syscall_64+0x91/0x180 <4> [309.733763] entry_SYSCALL_64_after_hwframe+0x76/0x7e <4> [309.733792] ... <4> [309.733806] ---[ end trace 0000000000000000 ]--- That scenario is most easily reproducible with igt@i915_module_load@reload-with-fault-injection. Fix the issue by moving the cleanup step to driver release path. (cherry picked from commit 795dbde92fe5c6996a02a5b579481de73035e7bf) The Linux kernel CVE team has assigned CVE-2025-37754 to this issue. Affected and fixed versions =========================== Issue introduced in 6.2 with commit 27536e03271da3dafcdddf735102041a26ad5bd0 and fixed in 6.6.88 with commit 9f5ef4a5eaa61a7a4ed31231da45deb85065397a Issue introduced in 6.2 with commit 27536e03271da3dafcdddf735102041a26ad5bd0 and fixed in 6.12.24 with commit c5a906806162aea62dbe5d327760ce3b7117ca17 Issue introduced in 6.2 with commit 27536e03271da3dafcdddf735102041a26ad5bd0 and fixed in 6.13.12 with commit 4bd4bf79bcfe101f0385ab81dbabb6e3f7d96c00 Issue introduced in 6.2 with commit 27536e03271da3dafcdddf735102041a26ad5bd0 and fixed in 6.14.3 with commit f104ef4db9f8f3923cc06ed1fafb3da38df6006d Issue introduced in 6.2 with commit 27536e03271da3dafcdddf735102041a26ad5bd0 and fixed in 6.15-rc2 with commit e3ea2eae70692a455e256787e4f54153fb739b90 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-37754 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/i915/gt/uc/intel_huc.c drivers/gpu/drm/i915/gt/uc/intel_huc.h drivers/gpu/drm/i915/gt/uc/intel_uc.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/9f5ef4a5eaa61a7a4ed31231da45deb85065397a https://git.kernel.org/stable/c/c5a906806162aea62dbe5d327760ce3b7117ca17 https://git.kernel.org/stable/c/4bd4bf79bcfe101f0385ab81dbabb6e3f7d96c00 https://git.kernel.org/stable/c/f104ef4db9f8f3923cc06ed1fafb3da38df6006d https://git.kernel.org/stable/c/e3ea2eae70692a455e256787e4f54153fb739b90