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 6342F1E3DE5 for ; Mon, 8 Dec 2025 01:17:34 +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=1765156654; cv=none; b=JSOrTYvfGKZ/jiw0LCyfU2IbpEkiNOFYkWBi/erxFJvyk7x7fVgyK18WVLNedIm7S+4KcrDKreARkiyzgegPd7nlLTqWTbjs5ANi8k9qNOdeiTXjR60j+aMXBjcDCgedDH6UwCCZAwMU7gujwHP0J2IN83KDv6fZWOBRCiWnkio= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765156654; c=relaxed/simple; bh=owz/pT9G+r/Qql9F8ebc30RMYVVpc6+n45kQYPVX75Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Cav1oyxnZNKt/c+LNMRb2c+2bJlVfPqs150q0SHYyLCMQPhsnAJEbn7LaLtZ3j2QL8HI9RgniTmD7P4Bsq6j9HQsYYYKBhU1YdPMA1RHdppCOElwJIaFLJpKNFcxaBYq+5lzmxZr26PtwiOIU1mDWc/9AR9jPzGUBHoQmGrbgHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Zlq2vlzv; 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="Zlq2vlzv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59788C4CEFB; Mon, 8 Dec 2025 01:17:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765156653; bh=owz/pT9G+r/Qql9F8ebc30RMYVVpc6+n45kQYPVX75Q=; h=From:To:Cc:Subject:Date:Reply-To:From; b=Zlq2vlzvbAG+ojLUPocev1b4tRmB6bwb59WG35kqdBFURTidk5L5l7BlMB3NfyIlz 095qDrDmSYD3A+VBk4bQAlBGPqT4xFzZnOt6X3AT6x9pNUVIX60ih+onyGqQONdScd GuI/IdBAvbfxDVeTch84/T5N1HYybrypO4aU8vyY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50619: drm/amdkfd: Fix memory leak in kfd_mem_dmamap_userptr() Date: Mon, 8 Dec 2025 10:16:56 +0900 Message-ID: <2025120852-CVE-2022-50619-9b47@gregkh> X-Mailer: git-send-email 2.52.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=2306; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=GWGpoAgL1SpZowYjuTg+HtpGOzCaSCZfOBskedkvfDo=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlm6izGtmyTDDaItVcLnN85fe3Fs8+XbPsdl/e/P+Jwo f9Xpy1POmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAibl8Y5sq1e187t+G+T2OS ba7l8Z3h054+fMMwT1uj5UhVOpPv6yNM50O3vdW6KepaAgA= 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 memory leak in kfd_mem_dmamap_userptr() If the number of pages from the userptr BO differs from the SG BO then the allocated memory for the SG table doesn't get freed before returning -EINVAL, which may lead to a memory leak in some error paths. Fix this by checking the number of pages before allocating memory for the SG table. The Linux kernel CVE team has assigned CVE-2022-50619 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit 264fb4d332f5e76743818480e482464437837c52 and fixed in 5.15.77 with commit 304a10161696d86300ceab1cbe72b2d74b8cdd94 Issue introduced in 5.14 with commit 264fb4d332f5e76743818480e482464437837c52 and fixed in 6.0.7 with commit c6dc4c9ba093829ebe1450d5fb101da6fb7a2a58 Issue introduced in 5.14 with commit 264fb4d332f5e76743818480e482464437837c52 and fixed in 6.1 with commit 90bfee142af0f0e9d3bec80e7acd5f49b230acf7 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-50619 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/304a10161696d86300ceab1cbe72b2d74b8cdd94 https://git.kernel.org/stable/c/c6dc4c9ba093829ebe1450d5fb101da6fb7a2a58 https://git.kernel.org/stable/c/90bfee142af0f0e9d3bec80e7acd5f49b230acf7