Commit 2bb90e5c authored by John Fastabend's avatar John Fastabend Committed by Daniel Borkmann
Browse files

bpf: sockmap, synchronize_rcu before free'ing map

We need to have a synchronize_rcu before free'ing the sockmap because
any outstanding psock references will have a pointer to the map and
when they use this could trigger a use after free.

Fixes: 604326b4

 ("bpf, sockmap: convert to generic sk_msg interface")
Signed-off-by: default avatarJohn Fastabend <>
Signed-off-by: default avatarDaniel Borkmann <>
parent 45a4521d
......@@ -247,6 +247,8 @@ static void sock_map_free(struct bpf_map *map)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment