Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 CFFD73B0AE7 for ; Thu, 28 May 2026 09:43:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779961421; cv=none; b=ieEXEzbyPinjnL9bnxjJotsASU8YNPvXT1TAM7VB2L889Y+frcph7qZLYpP7wuWtebKd8bJJhDlDT5s2Ocg8WfxuTXwZKg4qh8Yk+VnqnX/x5HDO5nbps5hUu2jX4spHkwIBtGh3Iu5qrjdnz16ajgmAO9WTp7A1w6E8r1BNTTw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779961421; c=relaxed/simple; bh=YQC7bncaNW6W61W7t1ma3ZInW9SfgZ8Ro0M39al9PJg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DLRbatcpBlr6B+X4ix3q65RktcOnK4AzM9JXm1vu93ZgEC+pX64NosRN0oUJmxqwzAPDtk4SCZlIHT1dzTYd2w9273VbL/IvZcDWFWSxnXirm+tVuS4B2tBMBVRknBkpgZ4OYEWgXInyY1+l3Lg8qissaxJI//S8e4aoID43gDU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Meezecar; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Meezecar" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38C811F000E9; Thu, 28 May 2026 09:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779961420; bh=cCkEJO+BnAN54XJ6LmBIUZf7+q+ZVqnAsTflnkLpfKI=; h=From:To:Cc:Subject:Date:Reply-To; b=Meezecar1ZcEnOMyjkQd1eXvOzdqaHFOvminTxt6BZwLkNaHmdtzt8vxRLidtWx+C Kzjk/CjkTqo4lxjkfLbb0xCtS6fYaC8oYhxZ2jqs3jCAgNBCf2KekFi11QibmFhOlL 34sOnTsQaTV8PdUUcC4L+ssC8dKa+vpEKEWNEchU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-46215: drm: Set old handle to NULL before prime swap in change_handle Date: Thu, 28 May 2026 11:40:50 +0200 Message-ID: <2026052836-CVE-2026-46215-4ede@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2976; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=pTDSmbrNLUQVrRlNC+de4wiK4Ybm2TJs7ZWr9cMIu+4=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkSvFOaJ5zbueojp4Lvq2trXnfkLRF4Laf/8fCMW0Vy2 c+EzRTWdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEou4yzM9n23Hv0n/Tqfev ritJivUylmJoWsKwYF3GPn95bU1XF7mju/bOObFs5yddcQA= 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: Set old handle to NULL before prime swap in change_handle There was a potential race condition in change_handle. The ioctl briefly had a single object with two idr entries; a concurrent gem_close could delete the object and remove one of the handles while leaving the other one dangling, which could subsequently be dereferenced for a use-after-free. To fix this, do the same dance that gem_close itself does. (f6cd7daecff5 drm: Release driver references to handle before making it available again) First idr_replace the old handle to NULL. Later, if the prime operations are successful, actually close it. create_tail required a similar dance to avoid a similar problem. (bd46cece51a3 drm/gem: Fix race in drm_gem_handle_create_tail()) It idr_allocs the new handle with NULL, then swaps in the correct object later to avoid races. We don't need to do that here, since the only operations that could race are drm_prime, and change_handle holds the prime lock for the entire duration. v2: cleanups of error paths The Linux kernel CVE team has assigned CVE-2026-46215 to this issue. Affected and fixed versions =========================== Issue introduced in 6.18 with commit 53096728b8910c6916ecc6c46a5abc5c678b58d9 and fixed in 6.18.32 with commit 672464dd53231509c9c771110798c56d4660e19e Issue introduced in 6.18 with commit 53096728b8910c6916ecc6c46a5abc5c678b58d9 and fixed in 7.0.9 with commit 61bd96d3e5472c253f9c1ab77608f0c8aaa9d025 Issue introduced in 6.18 with commit 53096728b8910c6916ecc6c46a5abc5c678b58d9 and fixed in 7.1-rc3 with commit 5e28b7b94408897e41c63477aabc9e1db439bc8c 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-2026-46215 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/drm_gem.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/672464dd53231509c9c771110798c56d4660e19e https://git.kernel.org/stable/c/61bd96d3e5472c253f9c1ab77608f0c8aaa9d025 https://git.kernel.org/stable/c/5e28b7b94408897e41c63477aabc9e1db439bc8c