aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mpi/mpi-mod.c
diff options
context:
space:
mode:
authorDaniel Borkmann <[email protected]>2025-10-03 07:34:18 +0000
committerAlexei Starovoitov <[email protected]>2025-10-07 04:20:10 +0000
commit23f3770e1a53e6c7a553135011f547209e141e72 (patch)
treeb3fe37484fa5e10548c32c2b87641e87d6656e1e /lib/mpi/mpi-mod.c
parentlibbpf: Fix undefined behavior in {get,put}_unaligned_be32() (diff)
downloadkernel-23f3770e1a53e6c7a553135011f547209e141e72.tar.gz
kernel-23f3770e1a53e6c7a553135011f547209e141e72.zip
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. Fixes: b4ab31414970 ("bpf: Add redirect_neigh helper as redirect drop-in") Reported-by: Yusuke Suzuki <[email protected]> Reported-by: Julian Wiedmann <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Cc: Martin KaFai Lau <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: Jordan Rife <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Jordan Rife <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Reviewed-by: Martin KaFai Lau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions