From mboxrd@z Thu Jan 1 00:00:00 1970 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 DB99845977 for ; Mon, 20 May 2024 09:48:55 +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=1716198535; cv=none; b=fw76FyYUhNO9BZ85NIRugU5Cm/YnZAu6th9irPUAAe7Cxp8cWeNEOfW8+fGqe1joMgjwUnXFdo/qbTAZRyKY+Z4pgilOS/E41MkBX3dbvHWx8Ft0Fz7h2hEezCqzvmUvVT94pcZhsN9RV0+HZwsHh+k2Vexp5tAOlpoHfbzI3Lw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716198535; c=relaxed/simple; bh=vv9F3EH4r8L6Ca+Ek9yrhs8jYMJNi0O5KKMlGo2J36Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=q4CE+Unav8JATHEUxOQ2nMwKndWLn4BX5vy639rDzLNweFN8cUfzX+fxmXFrTDqdrfBAMFyMEqueQnWkAiIw1UNWQKoMkIM71DPmPvdYBReDF888N5hBk5D+liv2NUod5E3/EJn3mhQ2i5NIG/+fNjMvMeszSyU3nB9oiHscT5E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NBFSbn9x; 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="NBFSbn9x" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EFFBC2BD10; Mon, 20 May 2024 09:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716198535; bh=vv9F3EH4r8L6Ca+Ek9yrhs8jYMJNi0O5KKMlGo2J36Q=; h=From:To:Cc:Subject:Date:Reply-to:From; b=NBFSbn9xkAb4FVeji2VHUOamXiY5Ugv7ipSJL5dV/5WKFdFaqHlD0fVuFDv1EVLRV 0cUv6vvynS+xlnidtfdWR5azeQFDRW9ISc3C4yh0eLdybR1wiohvqnl9QXncMscMcs lF1ARND+PeqiS04Oqz7RXw0pVU+Myj1kk9hHpmRo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-36000: mm/hugetlb: fix missing hugetlb_lock for resv uncharge Date: Mon, 20 May 2024 11:48:36 +0200 Message-ID: <2024052023-CVE-2024-36000-cfc4@gregkh> X-Mailer: git-send-email 2.45.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=2586; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=vv9F3EH4r8L6Ca+Ek9yrhs8jYMJNi0O5KKMlGo2J36Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDGneMukP5r4Wqtc37+2sXDEvovKVpNWrxszZa9o03AUTJ i5P6U3qiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgInUCzIsuPlqic3fxptJtTmO QZ8TbH8sejM7iGHBaZkGM4N4s8hfT6rd9PlPaz/z0i4DAA== 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/hugetlb: fix missing hugetlb_lock for resv uncharge There is a recent report on UFFDIO_COPY over hugetlb: https://lore.kernel.org/all/000000000000ee06de0616177560@google.com/ 350: lockdep_assert_held(&hugetlb_lock); Should be an issue in hugetlb but triggered in an userfault context, where it goes into the unlikely path where two threads modifying the resv map together. Mike has a fix in that path for resv uncharge but it looks like the locking criteria was overlooked: hugetlb_cgroup_uncharge_folio_rsvd() will update the cgroup pointer, so it requires to be called with the lock held. The Linux kernel CVE team has assigned CVE-2024-36000 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit 79aa925bf239 and fixed in 6.1.91 with commit 4c806333efea Issue introduced in 5.10 with commit 79aa925bf239 and fixed in 6.6.30 with commit f6c5d21db16a Issue introduced in 5.10 with commit 79aa925bf239 and fixed in 6.8.9 with commit 538faabf31e9 Issue introduced in 5.10 with commit 79aa925bf239 and fixed in 6.9 with commit b76b46902c2d Issue introduced in 5.9.7 with commit f87004c0b2bd 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-36000 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: mm/hugetlb.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/4c806333efea1000a2a9620926f560ad2e1ca7cc https://git.kernel.org/stable/c/f6c5d21db16a0910152ec8aa9d5a7aed72694505 https://git.kernel.org/stable/c/538faabf31e9c53d8c870d114846fda958a0de10 https://git.kernel.org/stable/c/b76b46902c2d0395488c8412e1116c2486cdfcb2