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 4F60D212F98 for ; Wed, 26 Feb 2025 02:13:06 +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=1740535986; cv=none; b=P8f0KW6dOQRvMdgaNGBgoZfwpKj5OhrIEOogfS56OzHdkGGK7ZRDXsijN5TQuU2O8PWSHzuF5qhLAFNKI5bNNCa1bqauXRGtwW1nAmDhy+l0XcR7pUwJr6gp3PuQmr4eoC36MpycdW8Ew6dmH4iE/uKbQIMWjWxt3ZPb/BVYzcs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535986; c=relaxed/simple; bh=0COBuIgMsXetQ346bxf4LmpJD3SFKopYegker+T2XLA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dxjCangMJHRr5LEB4j6L3UM2ha5OfdSOdaz2LpmYrY4Nn/TPMX7r2N+sLy7qJ3GbB4shAVyDaSmJZw2Lrgc0swpRiALxNdazRvAIBhU4aukJI5szYTvP1jUFh9lOZhO9whkfWut0R5bLM5CK8tFmZTYII/nKlJt9B2smaNZ57+Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cLFUjDbp; 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="cLFUjDbp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20D59C4CEDD; Wed, 26 Feb 2025 02:13:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535986; bh=0COBuIgMsXetQ346bxf4LmpJD3SFKopYegker+T2XLA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=cLFUjDbp8DsH5BhEQlFhX33C8Hu8EEgF1esg2ANE0l+ke6a1TFOJkI3jCD1PoBjUp 3PWTvX2AOWwUk1jiAx0f7GWmoiXNC9e0KxcU7wd6Zy+4g9dS7VOS3c0JzZ9TOd4CME pyHOa8auFaXoiteZV5YK1flwhVBpTJ2hQ4gIPTH8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49334: mm/huge_memory: Fix xarray node memory leak Date: Wed, 26 Feb 2025 03:10:08 +0100 Message-ID: <2025022639-CVE-2022-49334-7f6b@gregkh> X-Mailer: git-send-email 2.48.1 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=2388; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0COBuIgMsXetQ346bxf4LmpJD3SFKopYegker+T2XLA=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yp8YXt0ncrlQgk0+5E7mwf+zohp261jNLFzx68Bir +t6VucYOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAit6oY5rt9NOp7wHnpC/sR xeMbZ9annKmormBY0HGBSU9nb1Lf9qTMGeujc2seLT8SDwA= 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: mm/huge_memory: Fix xarray node memory leak If xas_split_alloc() fails to allocate the necessary nodes to complete the xarray entry split, it sets the xa_state to -ENOMEM, which xas_nomem() then interprets as "Please allocate more memory", not as "Please free any unnecessary memory" (which was the intended outcome). It's confusing to use xas_nomem() to free memory in this context, so call xas_destroy() instead. The Linux kernel CVE team has assigned CVE-2022-49334 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3 and fixed in 5.17.15 with commit c0c84962e297927ba57fd6ddc2bb000c9d149655 Issue introduced in 5.17 with commit 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3 and fixed in 5.18.4 with commit 95c8181b4947e000f3b9b8e5918d899fce77b93d Issue introduced in 5.17 with commit 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3 and fixed in 5.19 with commit 69a37a8ba1b408a1c7616494aa7018e4b3844cbe 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-49334 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: include/linux/xarray.h lib/xarray.c mm/huge_memory.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/c0c84962e297927ba57fd6ddc2bb000c9d149655 https://git.kernel.org/stable/c/95c8181b4947e000f3b9b8e5918d899fce77b93d https://git.kernel.org/stable/c/69a37a8ba1b408a1c7616494aa7018e4b3844cbe