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 253133074A2 for ; Tue, 28 Oct 2025 11:51:31 +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=1761652293; cv=none; b=PFzGsQ7ypcoQlPj9Cy+XlkS0ZeFDHTBM75f0ZEh77WKfZFjO7Iquj1NlLYxnK/ua7rBYtkfSifRkHSf//pVm5WEYXLfpowmokKdOBTgBN0C9XIItzoDPXSrkNXZ0JzbqoImZtPtVI7ghx4aPC8clFynv4rPLYfJ+n2/Fi1TGxC8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761652293; c=relaxed/simple; bh=M6dLmHptCC1RuYduEa23WMF0xFMawjdpGCmzdGKLpZ0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Wrz5ASDLhwwp9MgDQfX1rna60ulIFr06MgXYUf8ArUQvLps6HXT1cP8KO20aaS/bwxDraBoWu5oNUncBuDK0DcLUSmy1upOd8WKKFE/B5TpzHxLdh95yJx/GU54mnKFzHSNIXUxCBDXY6MvLvnUOXKAwExZbzmXKU+YrlmBbwuU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bhkifwjf; 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="bhkifwjf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45DC0C4CEE7; Tue, 28 Oct 2025 11:51:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761652291; bh=M6dLmHptCC1RuYduEa23WMF0xFMawjdpGCmzdGKLpZ0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=bhkifwjfTUEhlGoiI1qr846ejWiYdP2uiXE9Z3gh5LtzCueJKsxPW0xrB5QbVgN/u KY+UuxOnFZ7dqkIjlJmEhK0YFLXsvd4Utbm2j7ptcie8fHO04AKnbD+mlXyek2i2Sy sik3ldnJmdDlutdGddbgwtXFobP/nT18e/bgoj5Q= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40050: bpf: Skip scalar adjustment for BPF_NEG if dst is a pointer Date: Tue, 28 Oct 2025 12:48:27 +0100 Message-ID: <2025102814-CVE-2025-40050-1f2d@gregkh> X-Mailer: git-send-email 2.51.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=2136; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=IPzTsFQUBGp+QJdZBfMjd7P0bYBJoWqbttcc6JFAPOs=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkMa+vONU+SP9qb8XPZNf5jvObaV5W3Sh/WvayvMWGq7 NGL5d96OmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiuacZFlyMCntxNqLKRys8 /1eH9/WyJyfCVjHMs5/Qv8sibGXwt/T0rg8vfc8ecbI4AwA= 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: bpf: Skip scalar adjustment for BPF_NEG if dst is a pointer In check_alu_op(), the verifier currently calls check_reg_arg() and adjust_scalar_min_max_vals() unconditionally for BPF_NEG operations. However, if the destination register holds a pointer, these scalar adjustments are unnecessary and potentially incorrect. This patch adds a check to skip the adjustment logic when the destination register contains a pointer. The Linux kernel CVE team has assigned CVE-2025-40050 to this issue. Affected and fixed versions =========================== Issue introduced in 6.17 with commit aced132599b3c8884c050218d4c48eef203678f6 and fixed in 6.17.3 with commit b9ef4963227246b9222e1559ddeec8e7af63e6c6 Issue introduced in 6.17 with commit aced132599b3c8884c050218d4c48eef203678f6 and fixed in 6.18-rc1 with commit 34904582b502a86fdb4d7984b12cacd2faabbe0d 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-40050 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/verifier.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/b9ef4963227246b9222e1559ddeec8e7af63e6c6 https://git.kernel.org/stable/c/34904582b502a86fdb4d7984b12cacd2faabbe0d