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 ABAD32E613A for ; Wed, 12 Nov 2025 22:01:03 +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=1762984863; cv=none; b=H+vHX81l5i9DUolgWC7dhrHIFF7MrGAPg1kCVJtbA5REY15caIGuwbydr6WDXp4V3p3Sl2x/3YrY1wyDGk2ecitm18mUdZ0iVYXzRX69o5vshSro6JuNMf93IaP2MdNMo9qcDpGelDuWN/UPcX5UbTsYANFfgZvNv0JCMG7vzsI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762984863; c=relaxed/simple; bh=31Rmvn7rPrCLWISyMpZ4wDLdqVotcQrNN+gWQAO9lwo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Fy2jEsGGRyYyGwo6GbwP6h8Jl7ttWUA/w31CmD6pNu6FeBvOL8fOm3BrqSVNkK6ySvw/ZtU3MB/lwzSCyWDbhWvyoR5QFPCI9+rz4/Ve2jhA7SFAqAKcO8/eZYbwtILCbXAGx/DJ0K/jgfAB8Mk+Ct1zAbpayoX850IbEzMZv5Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0w4QRdh5; 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="0w4QRdh5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 241EDC16AAE; Wed, 12 Nov 2025 22:01:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1762984863; bh=31Rmvn7rPrCLWISyMpZ4wDLdqVotcQrNN+gWQAO9lwo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=0w4QRdh51CEnbwY5ql1XYOzG58EbSDue7/rZphfucg9aHQgPpMU+6EUSVbhH0X4Iv GQq5JA2TfbklvUc0Nr/XQHvPct5alHTrkBWfEkN5VQFaCOGkZL01yCrY4qp73PgoLI jyFgqgWW2akuP9kPc0Y8BHqGTwCsOLqopcv+KLcs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40191: drm/amdkfd: Fix kfd process ref leaking when userptr unmapping Date: Wed, 12 Nov 2025 17:00:54 -0500 Message-ID: <2025111245-CVE-2025-40191-1ea5@gregkh> X-Mailer: git-send-email 2.51.2 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=2099; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=m/QUPng8cRR04w6Y/CuIODc77+PaT5tOwtJx2bpviE0=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmizL1/nPUVd+zm3eo1y9B3+cwclU8q7oXJgkLCi53OT WQ7+WR9RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkciTD/KqOe/mvJvQlq9l8 tq43XTZjKfN1V4b5oVrbBJfnq1xZ//7Qxr8y1qtl6zczAAA= 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: Fix kfd process ref leaking when userptr unmapping kfd_lookup_process_by_pid hold the kfd process reference to ensure it doesn't get destroyed while sending the segfault event to user space. Calling kfd_lookup_process_by_pid as function parameter leaks the kfd process refcount and miss the NULL pointer check if app process is already destroyed. The Linux kernel CVE team has assigned CVE-2025-40191 to this issue. Affected and fixed versions =========================== Issue introduced in 6.16 with commit 2d274bf7099bc5e95fabaa93f23d0eb2977187ad and fixed in 6.17.4 with commit 60f6112fc9b3ba0eae519f10702c0c13bab45742 Issue introduced in 6.16 with commit 2d274bf7099bc5e95fabaa93f23d0eb2977187ad and fixed in 6.18-rc1 with commit 58e6fc2fb94f0f409447e5d46cf6a417b6397fbc 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-40191 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/amdgpu/amdgpu_amdkfd_gpuvm.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/60f6112fc9b3ba0eae519f10702c0c13bab45742 https://git.kernel.org/stable/c/58e6fc2fb94f0f409447e5d46cf6a417b6397fbc