diff options
| author | Jakub Sitnicki <[email protected]> | 2023-01-21 12:41:43 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2023-01-25 05:32:55 +0000 |
| commit | 5b4a79ba65a1ab479903fff2e604865d229b70a9 (patch) | |
| tree | a66f61b356c2708795f7a336ac4a5dfe5dc1239c /net/ipv4/tcp_bpf.c | |
| parent | bpf: Add missing btf_put to register_btf_id_dtor_kfuncs (diff) | |
| download | kernel-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
