Re: [PATCH bpf 2/2] libbpf: fix possible use after free in xsk_socket__delete

2020-11-04 Thread Andrii Nakryiko
On Wed, Nov 4, 2020 at 12:27 AM Magnus Karlsson wrote: > > On Tue, Nov 3, 2020 at 8:05 PM Andrii Nakryiko > wrote: > > > > On Tue, Nov 3, 2020 at 1:42 AM Magnus Karlsson > > wrote: > > > > > > From: Magnus Karlsson > > > > > > Fix a possible use after free in xsk_socket__delete that will happen

Re: [PATCH bpf 2/2] libbpf: fix possible use after free in xsk_socket__delete

2020-11-04 Thread Magnus Karlsson
On Tue, Nov 3, 2020 at 8:05 PM Andrii Nakryiko wrote: > > On Tue, Nov 3, 2020 at 1:42 AM Magnus Karlsson > wrote: > > > > From: Magnus Karlsson > > > > Fix a possible use after free in xsk_socket__delete that will happen > > if xsk_put_ctx() frees the ctx. To fix, save the umem reference taken >

Re: [PATCH bpf 2/2] libbpf: fix possible use after free in xsk_socket__delete

2020-11-03 Thread Andrii Nakryiko
On Tue, Nov 3, 2020 at 1:42 AM Magnus Karlsson wrote: > > From: Magnus Karlsson > > Fix a possible use after free in xsk_socket__delete that will happen > if xsk_put_ctx() frees the ctx. To fix, save the umem reference taken > from the context and just use that instead. > > Fixes: 2f6324a3937f ("