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 4410A15AD9B for ; Mon, 29 Jul 2024 14:34:19 +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=1722263659; cv=none; b=IM/JIAtyPf1lqCaRJRn44g1x1CXbxdAfgJTIOUnLjOv5vtcrryom+hUJGpO4DvqLt//fTfKaJENxNA6syW934pV5nZy8xDGPrvFu2moRBZt7NNgS4apkl1Z3lKO8nvviwm/cjiFm35gzIvi8c7FL/VRcdIypDIg+DZl+kZhym9A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722263659; c=relaxed/simple; bh=0BmVY11ylMY/ZbrXla9Ls+4LirxC8TLkNEpYSvZBh7k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=d8ugDPtllxAj4VDr0rKOgO9TJ1XLFwLig5Wy7Umh4NxKWloM1kQiCsMVKjlKM2ZfDUaUa6VRyPPpFX+eKlUbsWmSh3CdLUfssVJQZgsDdEuBk01KMnl9fX97w8NPe0yrvz/NCXgADr3/lS4cTkldHiw+LvZy+K/dyFE62K08ga4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jHV5QxNR; 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="jHV5QxNR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BF8DC4AF09; Mon, 29 Jul 2024 14:34:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722263659; bh=0BmVY11ylMY/ZbrXla9Ls+4LirxC8TLkNEpYSvZBh7k=; h=From:To:Cc:Subject:Date:Reply-to:From; b=jHV5QxNR4NU9vk2+Bp3av9kd6zz8waJGSKMKlqjKaaP+a5VydaZYd2FTRxIN178Hx 3vIULwNywkq6sAbCd4cIDniK+5+seWYmBFSjzvmyb2VQ6ksNTxO/e+CjmrqfUCnIg0 PGJXta9C83bP7MM05K4kJ+An2iKopm9nyP8vWNzA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-41055: mm: prevent derefencing NULL ptr in pfn_section_valid() Date: Mon, 29 Jul 2024 16:32:50 +0200 Message-ID: <2024072928-CVE-2024-41055-5764@gregkh> X-Mailer: git-send-email 2.45.2 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=2774; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0BmVY11ylMY/ZbrXla9Ls+4LirxC8TLkNEpYSvZBh7k=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnLl/95ODdCJ+KJ57vt5WbXb0Y1xKSETrU4tcHtxPlUj qeT7z750hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATuTGFYRYTn8eVv+dFF18p uL2xeJEon/LhmlUMC1rNmM0SlZ9t1V6iOv+yRtXRqx9vsgMA 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: prevent derefencing NULL ptr in pfn_section_valid() Commit 5ec8e8ea8b77 ("mm/sparsemem: fix race in accessing memory_section->usage") changed pfn_section_valid() to add a READ_ONCE() call around "ms->usage" to fix a race with section_deactivate() where ms->usage can be cleared. The READ_ONCE() call, by itself, is not enough to prevent NULL pointer dereference. We need to check its value before dereferencing it. The Linux kernel CVE team has assigned CVE-2024-41055 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10.210 with commit 90ad17575d26 and fixed in 5.10.222 with commit 0100aeb8a12d Issue introduced in 5.15.149 with commit b448de2459b6 and fixed in 5.15.163 with commit bc17f2377818 Issue introduced in 6.1.76 with commit 68ed9e333240 and fixed in 6.1.100 with commit 941e81618566 Issue introduced in 6.6.15 with commit 70064241f222 and fixed in 6.6.41 with commit 797323d1cf92 Issue introduced in 6.8 with commit 5ec8e8ea8b77 and fixed in 6.9.10 with commit adccdf702b4e Issue introduced in 6.8 with commit 5ec8e8ea8b77 and fixed in 6.10 with commit 82f0b6f041fa Issue introduced in 6.7.3 with commit 3a01daace71b 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-41055 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/mmzone.h 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/0100aeb8a12d51950418e685f879cc80cb8e5982 https://git.kernel.org/stable/c/bc17f2377818dca643a74499c3f5333500c90503 https://git.kernel.org/stable/c/941e816185661bf2b44b488565d09444ae316509 https://git.kernel.org/stable/c/797323d1cf92d09b7a017cfec576d9babf99cde7 https://git.kernel.org/stable/c/adccdf702b4ea913ded5ff512239e382d7473b63 https://git.kernel.org/stable/c/82f0b6f041fad768c28b4ad05a683065412c226e