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 800781F9401 for ; Mon, 21 Oct 2024 18:08:23 +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=1729534103; cv=none; b=oFd2q1UcmQrknY38WoXbPuA4MPgXTBzeyAZNssOZIDV4Cgj7mcIYZNxtiBfDeSCBwcWYWCsJ74KbTnM2E6JCtgMSHbiFw918cjvIDuOOuZhaC6xqKSiO4nXAzJGfwfwhvigsk8wK6vllxfRH8Iy+UtEtUimMj+JYyBzWGjnQzQc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729534103; c=relaxed/simple; bh=Kxv3GITCiCN2Xd1xmDe8+rDhKkMW/TC1xHJIS/53paE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QB61JOurOXBDWMopkC48fb94RELtPjVoltW4R1nsuTdWmSHNyt8rmDSlJ4wFyc6JjrCt/KjUWUOdEXP5CpRj8AXEoEIPOCHgvqM0OU5LUiFteOB5bdPIOJMGD8iRlRD2BIOJ3I6NhBs/+z8xt7asbdzfzICB6fBH17jJxNym8sA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NTTqtt19; 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="NTTqtt19" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03914C4CEC3; Mon, 21 Oct 2024 18:08:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729534103; bh=Kxv3GITCiCN2Xd1xmDe8+rDhKkMW/TC1xHJIS/53paE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=NTTqtt19hHFXpqCOm9uQ0bHUxYgnBLgYIfWDhybAo3TF1gaAASF6f0jqODTdlwTLt GGKbdBtvSGuYPXvTV5ZbdLbJDqyVfQVD0558/YD817vROWb3HGN9ROrwfEu+VT/l/Y 7VVx3djt81yJGf3XKcKkobIGxXaVd5HP8YJKDRdY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-49991: drm/amdkfd: amdkfd_free_gtt_mem clear the correct pointer Date: Mon, 21 Oct 2024 20:03:19 +0200 Message-ID: <2024102137-CVE-2024-49991-59d4@gregkh> X-Mailer: git-send-email 2.47.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=2337; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Kxv3GITCiCN2Xd1xmDe8+rDhKkMW/TC1xHJIS/53paE=; b=owGbwMvMwCRo6H6F97bub03G02pJDOli0xk/cX9LmZhtsPHYjqvMC4R+//ZpWz2vpnHSackd9 g75D5jXdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEct8wLOg7tcDUeMKu/ZyR 54ydv6/9YBu6VY5hwUZbr/QbXSV9n69+bgp+Myn9WGPWXwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: amdkfd_free_gtt_mem clear the correct pointer Pass pointer reference to amdgpu_bo_unref to clear the correct pointer, otherwise amdgpu_bo_unref clear the local variable, the original pointer not set to NULL, this could cause use-after-free bug. The Linux kernel CVE team has assigned CVE-2024-49991 to this issue. Affected and fixed versions =========================== Fixed in 6.6.55 with commit 30ceb873cc2e Fixed in 6.10.14 with commit 71f3240f8298 Fixed in 6.11.3 with commit 6c9289806591 Fixed in 6.12-rc1 with commit c86ad39140bb 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-2024-49991 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.c drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h drivers/gpu/drm/amd/amdkfd/kfd_chardev.c drivers/gpu/drm/amd/amdkfd/kfd_device.c drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c drivers/gpu/drm/amd/amdkfd/kfd_process.c drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.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/30ceb873cc2e97348d9da2265b2d1ddf07f682e1 https://git.kernel.org/stable/c/71f3240f82987f0f070ea5bed559033de7d4c0e1 https://git.kernel.org/stable/c/6c9289806591807e4e3be9a23df8ee2069180055 https://git.kernel.org/stable/c/c86ad39140bbcb9dc75a10046c2221f657e8083b