Re: [PATCH bpf] flow_dissector: Fix potential use-after-free on BPF_PROG_DETACH

2019-08-23 Thread Daniel Borkmann
On 8/21/19 2:17 PM, Jakub Sitnicki wrote: Call to bpf_prog_put(), with help of call_rcu(), queues an RCU-callback to free the program once a grace period has elapsed. The callback can run together with new RCU readers that started after the last grace period. New RCU readers can potentially see t

Re: [PATCH bpf] flow_dissector: Fix potential use-after-free on BPF_PROG_DETACH

2019-08-21 Thread Petar Penkov
This makes sense, thanks! Acked-by: Petar Penkov On Wed, Aug 21, 2019 at 5:19 AM Jakub Sitnicki wrote: > > Call to bpf_prog_put(), with help of call_rcu(), queues an RCU-callback to > free the program once a grace period has elapsed. The callback can run > together with new RCU readers that sta

[PATCH bpf] flow_dissector: Fix potential use-after-free on BPF_PROG_DETACH

2019-08-21 Thread Jakub Sitnicki
Call to bpf_prog_put(), with help of call_rcu(), queues an RCU-callback to free the program once a grace period has elapsed. The callback can run together with new RCU readers that started after the last grace period. New RCU readers can potentially see the "old" to-be-freed or already-freed pointe