Re: [Patch bpf-next] bpf: clear per_cpu pointers in bpf_prog_clone_create()

2021-02-17 Thread Daniel Borkmann
On 2/17/21 11:46 PM, Cong Wang wrote: On Wed, Feb 17, 2021 at 2:01 PM Daniel Borkmann wrote: On 2/17/21 4:58 AM, Cong Wang wrote: From: Cong Wang Pretty much similar to commit 1336c662474e ("bpf: Clear per_cpu pointers during bpf_prog_realloc") we also need to clear these two percpu pointers

Re: [Patch bpf-next] bpf: clear per_cpu pointers in bpf_prog_clone_create()

2021-02-17 Thread Cong Wang
On Wed, Feb 17, 2021 at 2:01 PM Daniel Borkmann wrote: > > On 2/17/21 4:58 AM, Cong Wang wrote: > > From: Cong Wang > > > > Pretty much similar to commit 1336c662474e > > ("bpf: Clear per_cpu pointers during bpf_prog_realloc") we also need to > > clear these two percpu pointers in bpf_prog_clone_

Re: [Patch bpf-next] bpf: clear per_cpu pointers in bpf_prog_clone_create()

2021-02-17 Thread Daniel Borkmann
On 2/17/21 4:58 AM, Cong Wang wrote: From: Cong Wang Pretty much similar to commit 1336c662474e ("bpf: Clear per_cpu pointers during bpf_prog_realloc") we also need to clear these two percpu pointers in bpf_prog_clone_create(), otherwise would get a double free: BUG: kernel NULL pointer dere

RE: [Patch bpf-next] bpf: clear per_cpu pointers in bpf_prog_clone_create()

2021-02-17 Thread John Fastabend
Cong Wang wrote: > From: Cong Wang > > Pretty much similar to commit 1336c662474e > ("bpf: Clear per_cpu pointers during bpf_prog_realloc") we also need to > clear these two percpu pointers in bpf_prog_clone_create(), otherwise > would get a double free: > > BUG: kernel NULL pointer dereference

[Patch bpf-next] bpf: clear per_cpu pointers in bpf_prog_clone_create()

2021-02-16 Thread Cong Wang
From: Cong Wang Pretty much similar to commit 1336c662474e ("bpf: Clear per_cpu pointers during bpf_prog_realloc") we also need to clear these two percpu pointers in bpf_prog_clone_create(), otherwise would get a double free: BUG: kernel NULL pointer dereference, address: #PF: