From mboxrd@z Thu Jan 1 00:00:00 1970 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 CD41E503BC3 for ; Fri, 4 Sep 2026 16:51:29 +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=1788540691; cv=none; b=HNrKNq+5O3Ma2yeU6DiH4OjM2CvwsLRb6Ci22uxafGjboi2yaX2Rq3Rhe41tXA+h+F8VubUREkM26riOZkWgFcgVChLxMwJhZL5CoV8a/zkJ9vwPrFD1JO3R7xch6DJsJMFjif1VwVheoGIgdKmiDGV3GgceZoEqhUVkT/KshEE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788540691; c=relaxed/simple; bh=7SSSI2yRAloMVMngadbofZFFtIZq8GlplDiwzAwTMeg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=sTRk0yS12UWx/iaucvPL9gvDCME8ZZKcL0vf9t+RE9V5BV6hdIOHPA/22fTjA3LTNjqciITVi4SHoZyrQelwkHrX30oPciG+b66OCSxbytXCL4efvgeZYJNTakn6MfKEbKpHjaB4AIqfSlWCODFqVSYI8nkN1mhD5azogRrsRVk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RnUY3V/9; 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="RnUY3V/9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD6051F00A3D; Fri, 4 Sep 2026 16:51:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788540689; bh=ZQfVK9G/G8mwALnzJUjpnKpStd+3bcJcMLx02jwiqYQ=; h=From:To:Cc:Subject:Date:Reply-To; b=RnUY3V/9UDCJ34BYpX/bG/kqPeOqNfiDVT77MLWeSx/3zZXaQgz58gRDZ9I5VyGky GWWR9f4OXMXGcgNaGlFeuADCHAl7JZKVVXnPdgJTXstz+XnBflwsPQFJOQK/wJT8j0 XKoOMdZ9QRc33vxe0OHEVSsQMPV2jAX6VI/nVgyU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-80870: drm/amdkfd: Validate CRIU-restored IDs before idr_alloc Date: Fri, 4 Sep 2026 18:46:37 +0200 Message-ID: <2026090434-CVE-2026-80870-d17a@gregkh> X-Mailer: git-send-email 2.55.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=3925; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Sznl2TsTuhuCp+DcHmg6uhiE4ZRmug0CUpQMDDNFU6Y=; b=owGbwMvMwCRo6H6F97bub03G02pJDFmzvr66f6Zjytu81zevfJ379d0vhaPTn8Szie2KcgnpO 8G3SmbFzI5YFgZBJgZZMUWWL9t4ju6vOKToZWh7GmYOKxPIEAYuTgGYSGkNw/xorqOyjpyiAmel k1js/SQVBXeXCjMs2JNcIBMmuaN6q0X7Xfeasquf3RevAwA= 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/amdkfd: Validate CRIU-restored IDs before idr_alloc The KFD CRIU restore flow restores previously saved object IDs from userspace. For event restore: kfd_criu_restore_event() -> create_signal_event() / create_other_event() -> allocate_event_notification_slot() -> idr_alloc(..., *restore_id, *restore_id + 1, ...) For BO restore: criu_restore_memory_of_gpu() -> idr_alloc(..., bo_priv->idr_handle, ...) In both cases, the restored ID comes from userspace-provided CRIU data. idr_alloc() expects the ID range values to fit within signed int limits. If a restored ID is larger than INT_MAX, it can trigger a WARN in the IDR layer. A kernel WARN is undesirable because it prints a warning trace and may cause a panic or reboot on systems with panic_on_warn enabled. Smatch reported these paths as allowing unchecked userspace values to reach idr_alloc(). Add INT_MAX validation before using restored IDs in: - kfd_criu_restore_event() - criu_restore_memory_of_gpu() If the restored ID is invalid, return -EINVAL. This prevents invalid restore data from reaching the IDR layer and avoids WARN-triggering paths, while keeping valid restore behavior unchanged. The Linux kernel CVE team has assigned CVE-2026-80870 to this issue. Affected and fixed versions =========================== Issue introduced in 5.18 with commit 40e8a766a761f7fdc8530347527b344fddf6f1a8 and fixed in 6.1.178 with commit f8687018f24037056692c1e93c7d96cc72889d5b Issue introduced in 5.18 with commit 40e8a766a761f7fdc8530347527b344fddf6f1a8 and fixed in 6.6.145 with commit 89a75e3349c4fae28cbedc711bc924cbc6293da2 Issue introduced in 5.18 with commit 40e8a766a761f7fdc8530347527b344fddf6f1a8 and fixed in 6.12.97 with commit 085ea93bda71fee600cc12a17026598eb10dd1f9 Issue introduced in 5.18 with commit 40e8a766a761f7fdc8530347527b344fddf6f1a8 and fixed in 6.18.40 with commit 543ed0f61d56501cc585162da600bbedd7c08c0f Issue introduced in 5.18 with commit 40e8a766a761f7fdc8530347527b344fddf6f1a8 and fixed in 7.1.5 with commit cb6311f25a096621ac7ffd91b50d1bb1cfb63a96 Issue introduced in 5.18 with commit 40e8a766a761f7fdc8530347527b344fddf6f1a8 and fixed in 7.2 with commit 85043dd49c2f51a37b22618168e3ae59ab92f0d6 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-80870 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/amd/amdkfd/kfd_chardev.c drivers/gpu/drm/amd/amdkfd/kfd_events.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/f8687018f24037056692c1e93c7d96cc72889d5b https://git.kernel.org/stable/c/89a75e3349c4fae28cbedc711bc924cbc6293da2 https://git.kernel.org/stable/c/085ea93bda71fee600cc12a17026598eb10dd1f9 https://git.kernel.org/stable/c/543ed0f61d56501cc585162da600bbedd7c08c0f https://git.kernel.org/stable/c/cb6311f25a096621ac7ffd91b50d1bb1cfb63a96 https://git.kernel.org/stable/c/85043dd49c2f51a37b22618168e3ae59ab92f0d6