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 469D11DC991 for ; Wed, 12 Mar 2025 09:43:36 +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=1741772617; cv=none; b=e+pHG1Jqn0cgj5bo9OYgRdLKjhVE7O0SJioARXqTaSBZpNmYA1TRfYjDBQ5xs+9Eumh1QsotwoCsz0909OeY6v38YL6Ii79TjrhbISOTLsfxPS3saSOus1Zy8Z6J0CAUh/dnV0o1QUJt4QO67FbfaEj9MttfTZDY2XqAw43gb8A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741772617; c=relaxed/simple; bh=TwUpAvjYaVfO1l3Z3TD/vv3uQKaEXbMcf/fS+2Y3UkU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RDCuS4zUbp7mFDCo0nyj3jHVYK9PGvO6WuZDy6SD43WoHXR8w47eSEHIE24zalDHWmnorWWL7VV2ryfIGA8Nhyl3xhThNmUAD9j8Dx7o1xImE20vRgKhDzLRNMUyF4I2gJyFoxVs/BitDQ3CTGiltch29FihxCHMNRTJyTiwcew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ej+eXYqp; 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="Ej+eXYqp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 589EAC4CEE3; Wed, 12 Mar 2025 09:43:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741772616; bh=TwUpAvjYaVfO1l3Z3TD/vv3uQKaEXbMcf/fS+2Y3UkU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Ej+eXYqpJ1sGf1Z3yhQXbjvtjaIpFaigOAkImXtKmPWeH2wDIA9q378rG/x5As36k gBcYMelybrFrjaAmXDbJOFfCzZPbnY7BR+OlLKKW0regS8LxI/BAIoqrKQDjzPPig4 On5fOKuum6rajr1/OHbtgGy83ttUoj//1EVnUUqc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21851: bpf: Fix softlockup in arena_map_free on 64k page kernel Date: Wed, 12 Mar 2025 10:42:17 +0100 Message-ID: <2025031213-CVE-2025-21851-87bd@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=2571; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=TwUpAvjYaVfO1l3Z3TD/vv3uQKaEXbMcf/fS+2Y3UkU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOkXw76enXCuaZPwsgM3Dk38pDP9QslJ5gW9YvOm5U8vc HHi+b9BpiOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmcmQtw1yZtZdDZsf/3jfR 9NC7qYv/994qmLmCYcFxgzf7lx1df7V4buuy066C3LuKZTwB 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: bpf: Fix softlockup in arena_map_free on 64k page kernel On an aarch64 kernel with CONFIG_PAGE_SIZE_64KB=y, arena_htab tests cause a segmentation fault and soft lockup. The same failure is not observed with 4k pages on aarch64. It turns out arena_map_free() is calling apply_to_existing_page_range() with the address returned by bpf_arena_get_kern_vm_start(). If this address is not page-aligned the code ends up calling apply_to_pte_range() with that unaligned address causing soft lockup. Fix it by round up GUARD_SZ to PAGE_SIZE << 1 so that the division by 2 in bpf_arena_get_kern_vm_start() returns a page-aligned value. The Linux kernel CVE team has assigned CVE-2025-21851 to this issue. Affected and fixed versions =========================== Issue introduced in 6.9 with commit 317460317a02a1af512697e6e964298dedd8a163 and fixed in 6.12.17 with commit c1f3f3892d4526f18aaeffdb6068ce861e793ee3 Issue introduced in 6.9 with commit 317460317a02a1af512697e6e964298dedd8a163 and fixed in 6.13.5 with commit 787d556a3de447e70964a4bdeba9196f62a62b1e Issue introduced in 6.9 with commit 317460317a02a1af512697e6e964298dedd8a163 and fixed in 6.14-rc4 with commit 517e8a7835e8cfb398a0aeb0133de50e31cae32b 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-2025-21851 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: kernel/bpf/arena.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/c1f3f3892d4526f18aaeffdb6068ce861e793ee3 https://git.kernel.org/stable/c/787d556a3de447e70964a4bdeba9196f62a62b1e https://git.kernel.org/stable/c/517e8a7835e8cfb398a0aeb0133de50e31cae32b