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 EFF9B30B507 for ; Fri, 5 Sep 2025 17:24:01 +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=1757093042; cv=none; b=AEmg3TYGvXURMetIdbvI1lIaORMma3o/IezbDXQkjVKj2dtuPBjEUK/s4i63CNdA5CszWAsfjtPRkXxYGKLZrRZ48kMnDIwdStfYNXarGMQGBSBLwItO8FCKjZ/DznhSNyrcAM8wcxwxtPcN6CnYo7J/JZJvECMVtxmsJhIUuoc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757093042; c=relaxed/simple; bh=+IeZhD8dIw82eqltLQ83lZykol3BflFCE7e7KOB18iQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=r7jm7bcs6TgUl6ljuwy0ODdM5nctSW8UIZ92gNXJKSwo8PYXzI88mQOabEyK25LxXOJyh9NhNb4/my5xERT/e1/2rxOJwUyYc+qQosdp/mEXvYFcW0LQXpSviS1p36XwgfraPx/4fRTuST7dKVh43xdv6xYZnAbjP/h0g5p0EJc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VK5mr+fW; 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="VK5mr+fW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28872C4CEF1; Fri, 5 Sep 2025 17:24:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757093041; bh=+IeZhD8dIw82eqltLQ83lZykol3BflFCE7e7KOB18iQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=VK5mr+fWib2111l3R9J2SHPo6+3bPMEhfkJPCCH59zTNipGhVFTHdynAC04DI9UHx btOmZ/u/EfEuiHB1uuFErOfgm/nKDnubjmF+Le1v1mcCz3x12DwVjI1E7b3ylFDFUK Nd8+o/+4hs5fuEJdpl0nt0y2+1ZA6OV98jPYeV38= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38731: drm/xe: Fix vm_bind_ioctl double free bug Date: Fri, 5 Sep 2025 19:20:40 +0200 Message-ID: <2025090541-CVE-2025-38731-9537@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=3726; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lO+q0UriBZd44UbgSxdRok0W9a0uM+XSG1v2r9yssXI=; b=owGbwMvMwCRo6H6F97bub03G02pJDBm7pV+yvdjo/n/BOoXCpglFgaVvHjRqhIbOzWpkLGRTu fK0yGtJRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEykToRhfkVKkJ6DQ8M8P9+T 1bV3/TovNi5YzLCgafLzlp86329c8ljXoiYXUvQviW0lAA== 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/xe: Fix vm_bind_ioctl double free bug If the argument check during an array bind fails, the bind_ops are freed twice as seen below. Fix this by setting bind_ops to NULL after freeing. ================================================================== BUG: KASAN: double-free in xe_vm_bind_ioctl+0x1b2/0x21f0 [xe] Free of addr ffff88813bb9b800 by task xe_vm/14198 CPU: 5 UID: 0 PID: 14198 Comm: xe_vm Not tainted 6.16.0-xe-eudebug-cmanszew+ #520 PREEMPT(full) Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-P DDR5 RVP, BIOS ADLPFWI1.R00.2411.A02.2110081023 10/08/2021 Call Trace: dump_stack_lvl+0x82/0xd0 print_report+0xcb/0x610 ? __virt_addr_valid+0x19a/0x300 ? xe_vm_bind_ioctl+0x1b2/0x21f0 [xe] kasan_report_invalid_free+0xc8/0xf0 ? xe_vm_bind_ioctl+0x1b2/0x21f0 [xe] ? xe_vm_bind_ioctl+0x1b2/0x21f0 [xe] check_slab_allocation+0x102/0x130 kfree+0x10d/0x440 ? should_fail_ex+0x57/0x2f0 ? xe_vm_bind_ioctl+0x1b2/0x21f0 [xe] xe_vm_bind_ioctl+0x1b2/0x21f0 [xe] ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe] ? __lock_acquire+0xab9/0x27f0 ? lock_acquire+0x165/0x300 ? drm_dev_enter+0x53/0xe0 [drm] ? find_held_lock+0x2b/0x80 ? drm_dev_exit+0x30/0x50 [drm] ? drm_ioctl_kernel+0x128/0x1c0 [drm] drm_ioctl_kernel+0x128/0x1c0 [drm] ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe] ? find_held_lock+0x2b/0x80 ? __pfx_drm_ioctl_kernel+0x10/0x10 [drm] ? should_fail_ex+0x57/0x2f0 ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe] drm_ioctl+0x352/0x620 [drm] ? __pfx_drm_ioctl+0x10/0x10 [drm] ? __pfx_rpm_resume+0x10/0x10 ? do_raw_spin_lock+0x11a/0x1b0 ? find_held_lock+0x2b/0x80 ? __pm_runtime_resume+0x61/0xc0 ? rcu_is_watching+0x20/0x50 ? trace_irq_enable.constprop.0+0xac/0xe0 xe_drm_ioctl+0x91/0xc0 [xe] __x64_sys_ioctl+0xb2/0x100 ? rcu_is_watching+0x20/0x50 do_syscall_64+0x68/0x2e0 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fa9acb24ded (cherry picked from commit a01b704527c28a2fd43a17a85f8996b75ec8492a) The Linux kernel CVE team has assigned CVE-2025-38731 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit b43e864af0d4e74636c0e1dee857ce3275a84829 and fixed in 6.16.4 with commit 77a946bf1af0e8110ef6e243394217a17f9b7e33 Issue introduced in 6.15 with commit b43e864af0d4e74636c0e1dee857ce3275a84829 and fixed in 6.17-rc3 with commit 111fb43a557726079a67ce3ab51f602ddbf7097e 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-38731 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/xe/xe_vm.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/77a946bf1af0e8110ef6e243394217a17f9b7e33 https://git.kernel.org/stable/c/111fb43a557726079a67ce3ab51f602ddbf7097e