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 76DC11EB5FA for ; Thu, 1 May 2025 14:16:22 +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=1746108982; cv=none; b=jcoSFeQCfa3ZsW6sAZ/nE95TsAdPSO0JiBg0iawJfNYFJjomtiuV7q+GEqa4ZoWcoZRWQX/Sin1Qa4qQTaDzwB29Zkdb/ae3h6nnIG6xNb2CJ8F/h5SaitJCj7eLHUKjgSHbyIe5XrklyqtR4TaHkOIKXdx1kXfyWlvBJpUf3Lw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746108982; c=relaxed/simple; bh=2G8T6rUBTw7F+HlMQTgZ1LV098C0Mn+MKTk5n5glzVk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PkBsIXQCxCWDvARn9ZGd2Q7L7oIB7caAhiOXB6YsSrFBmZ7vuZiOP3/S3bUIIeyb5FJyhIj/jwmFjCHBYu5R47RriVaooHzWsKPk9DSrbsAyaI2B16FklI2kiu67zKrA7tLKVy0MEUzp9UTSrTCprfJIGWwG2NqH7ij9clkh7qg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=I0fLpI+z; 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="I0fLpI+z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06326C4CEED; Thu, 1 May 2025 14:16:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746108982; bh=2G8T6rUBTw7F+HlMQTgZ1LV098C0Mn+MKTk5n5glzVk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=I0fLpI+zdChPx43Zaqlul8yFaHOA4sZcW/bKzsluDn16FHyWUdP13nyi4rVafWrvA +qxlXfbksQpS3jl6eBDZaGnviNt/Q/gAILbLyJi0NdL0mUEmQ3yBfr+UEij3xM+nwW SGmgUBrqGyBZJ7Tc6g9s57RJI+3zcldHDcaZigLg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49843: drm/amdkfd: Migrate in CPU page fault use current mm Date: Thu, 1 May 2025 16:10:33 +0200 Message-ID: <2025050141-CVE-2022-49843-f36d@gregkh> X-Mailer: git-send-email 2.49.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=2172; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=3M/hWWz8O9bVKeyCAPbGxoN67rdvggoRLK9dxG3n6qM=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCDUt5nvNOOpr/6bNQkUpuMOMJEUsj8apTm/zF1nxv2 JqRtHRdRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEwkYg3D/ODmCeGCnRc+nI3x 3ZhfO+Mey6XmeIa5ApUOEr4XHRy29rGcra9NLu6b8FQYAA== 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: Migrate in CPU page fault use current mm migrate_vma_setup shows below warning because we don't hold another process mm mmap_lock. We should use current vmf->vma->vm_mm instead, the caller already hold current mmap lock inside CPU page fault handler. WARNING: CPU: 10 PID: 3054 at include/linux/mmap_lock.h:155 find_vma Call Trace: walk_page_range+0x76/0x150 migrate_vma_setup+0x18a/0x640 svm_migrate_vram_to_ram+0x245/0xa10 [amdgpu] svm_migrate_to_ram+0x36f/0x470 [amdgpu] do_swap_page+0xcfe/0xec0 __handle_mm_fault+0x96b/0x15e0 handle_mm_fault+0x13f/0x3e0 do_user_addr_fault+0x1e7/0x690 The Linux kernel CVE team has assigned CVE-2022-49843 to this issue. Affected and fixed versions =========================== Issue fixed in mainline with commit 3a87606 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-2022-49843 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_migrate.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/1dea25e25acd990d7657940ffcab8354c28fa292 https://git.kernel.org/stable/c/128e284c6cccf5875261569fa3bb07558870c17f https://git.kernel.org/stable/c/3a876060892ba52dd67d197c78b955e62657d906