Re: [PATCH bpf-next] xsk: fix use-after-free in failed shared_umem bind

2020-09-02 Thread Daniel Borkmann
On 9/2/20 9:36 AM, Magnus Karlsson wrote: Fix use-after-free when a shared umem bind fails. The code incorrectly tried to free the allocated buffer pool both in the bind code and then later also when the socket was released. Fix this by setting the buffer pool pointer to NULL after the bind code

[PATCH bpf-next] xsk: fix use-after-free in failed shared_umem bind

2020-09-02 Thread Magnus Karlsson
Fix use-after-free when a shared umem bind fails. The code incorrectly tried to free the allocated buffer pool both in the bind code and then later also when the socket was released. Fix this by setting the buffer pool pointer to NULL after the bind code has freed the pool, so that the socket relea