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 AA85A2E613C for ; Wed, 12 Nov 2025 22:01:34 +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=1762984894; cv=none; b=GGQ+Ss2loJ3P3r5HbAxEkYBCFOSxDZ+sMzM8n/nReJWFImmcmg1spT5eUV7rssoPtqBWoKbcI+OGDjP2bLVBiaVbCmi04nR/f6FiDprj+0aahjnwa+Ij6wqMlT+ZqnX+GWSJ71oEpskz84I5rBabYUM1uDtsc4uyYtB2CFrL/3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762984894; c=relaxed/simple; bh=SG0SePsOy1zcbMnEWZJJer57r667O8XyJ66jkyiivdE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PrDQ4kuXbUWUqgD09KWn4gpRNv1g6+tBYrxYpnFJevcmLZpUYhC8lYAtBD8VWRqCXZgq55plasgRmLYfB4EZJoFHxuP24ewMn8Q/00og+Pr/SubP0g52kCNY8gDWOTyzoPGOTVvSJqq4kb7HNueA5Gd2rRe6v/DhVn2nnAEoen0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IFHEKDqx; 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="IFHEKDqx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68A43C4CEF7; Wed, 12 Nov 2025 22:01:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1762984894; bh=SG0SePsOy1zcbMnEWZJJer57r667O8XyJ66jkyiivdE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=IFHEKDqxwtMKwHw3gCoqPCf3thmTV87vipukZcUTL4xeGqY/ISdDudNJqW1q5j8HC Xh7+d68o232kMoyMuMLqYwt0qCcy1RDMwax581PEDADJfckOxGIWXUUak4/muH9hIG BKENSpoY/EWqleXehEv71khgHY/9sTWYtnSQfNGI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40183: bpf: Fix metadata_dst leak __bpf_redirect_neigh_v{4,6} Date: Wed, 12 Nov 2025 17:00:46 -0500 Message-ID: <2025111243-CVE-2025-40183-fb2f@gregkh> X-Mailer: git-send-email 2.51.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=3680; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=N9YZlP9404M+A/baex4ZTJl5CxnsRKmt+03CWDCkUcQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmizN0HGD/uUV7IGtDkNy/aSaz4tBRTdZbb98dqMw7zL k6ckH20I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACay8CzD/OT46WIS2i5nElWq ogxf72da4fdpM8M8i5V69wU8HmV/Pvzx+tzXlnLHWt8FAgA= 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: Fix metadata_dst leak __bpf_redirect_neigh_v{4,6} Cilium has a BPF egress gateway feature which forces outgoing K8s Pod traffic to pass through dedicated egress gateways which then SNAT the traffic in order to interact with stable IPs outside the cluster. The traffic is directed to the gateway via vxlan tunnel in collect md mode. A recent BPF change utilized the bpf_redirect_neigh() helper to forward packets after the arrival and decap on vxlan, which turned out over time that the kmalloc-256 slab usage in kernel was ever-increasing. The issue was that vxlan allocates the metadata_dst object and attaches it through a fake dst entry to the skb. The latter was never released though given bpf_redirect_neigh() was merely setting the new dst entry via skb_dst_set() without dropping an existing one first. The Linux kernel CVE team has assigned CVE-2025-40183 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit b4ab31414970a7a03a5d55d75083f2c101a30592 and fixed in 5.10.246 with commit 3fba965a9aac0fa3cbd8138436a37af9ab466d79 Issue introduced in 5.10 with commit b4ab31414970a7a03a5d55d75083f2c101a30592 and fixed in 5.15.195 with commit 057764172fcc6ee2ccb6c41351a55a9f054dc8fd Issue introduced in 5.10 with commit b4ab31414970a7a03a5d55d75083f2c101a30592 and fixed in 6.1.157 with commit 2e67c2037382abb56497bb9d7b7e10be04eb5598 Issue introduced in 5.10 with commit b4ab31414970a7a03a5d55d75083f2c101a30592 and fixed in 6.6.113 with commit b6bfe44b6dbb14a31d86c475cdc9c7689534fb09 Issue introduced in 5.10 with commit b4ab31414970a7a03a5d55d75083f2c101a30592 and fixed in 6.12.54 with commit f36a305d30f557306d87c787ddffe094ac5dac89 Issue introduced in 5.10 with commit b4ab31414970a7a03a5d55d75083f2c101a30592 and fixed in 6.17.4 with commit 7404ce888a45eb7da0508b7cbbe6f2e95302eeb8 Issue introduced in 5.10 with commit b4ab31414970a7a03a5d55d75083f2c101a30592 and fixed in 6.18-rc1 with commit 23f3770e1a53e6c7a553135011f547209e141e72 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-40183 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: net/core/filter.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/3fba965a9aac0fa3cbd8138436a37af9ab466d79 https://git.kernel.org/stable/c/057764172fcc6ee2ccb6c41351a55a9f054dc8fd https://git.kernel.org/stable/c/2e67c2037382abb56497bb9d7b7e10be04eb5598 https://git.kernel.org/stable/c/b6bfe44b6dbb14a31d86c475cdc9c7689534fb09 https://git.kernel.org/stable/c/f36a305d30f557306d87c787ddffe094ac5dac89 https://git.kernel.org/stable/c/7404ce888a45eb7da0508b7cbbe6f2e95302eeb8 https://git.kernel.org/stable/c/23f3770e1a53e6c7a553135011f547209e141e72