aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_bpf.c
diff options
context:
space:
mode:
authorJakub Sitnicki <[email protected]>2023-01-21 12:41:43 +0000
committerAlexei Starovoitov <[email protected]>2023-01-25 05:32:55 +0000
commit5b4a79ba65a1ab479903fff2e604865d229b70a9 (patch)
treea66f61b356c2708795f7a336ac4a5dfe5dc1239c /net/ipv4/tcp_bpf.c
parentbpf: Add missing btf_put to register_btf_id_dtor_kfuncs (diff)
downloadkernel-5b4a79ba65a1ab479903fff2e604865d229b70a9.tar.gz
kernel-5b4a79ba65a1ab479903fff2e604865d229b70a9.zip
bpf, sockmap: Don't let sock_map_{close,destroy,unhash} call itself
sock_map proto callbacks should never call themselves by design. Protect against bugs like [1] and break out of the recursive loop to avoid a stack overflow in favor of a resource leak. [1] https://lore.kernel.org/all/[email protected]/ Suggested-by: Eric Dumazet <[email protected]> Signed-off-by: Jakub Sitnicki <[email protected]> Acked-by: John Fastabend <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_bpf.c')
0 files changed, 0 insertions, 0 deletions