Re: [Patch bpf-next] sock_map: fix a potential use-after-free in sock_map_close()

2021-04-12 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (refs/heads/master): On Wed, 7 Apr 2021 20:05:56 -0700 you wrote: > From: Cong Wang > > The last refcnt of the psock can be gone right after > sock_map_remove_links(), so sk_psock_stop() could trigger a UAF. > The reason why I placed sk_psock_s

Re: [Patch bpf-next] sock_map: fix a potential use-after-free in sock_map_close()

2021-04-12 Thread Jakub Sitnicki
On Thu, Apr 08, 2021 at 05:05 AM CEST, Cong Wang wrote: > From: Cong Wang > > The last refcnt of the psock can be gone right after > sock_map_remove_links(), so sk_psock_stop() could trigger a UAF. > The reason why I placed sk_psock_stop() there is to avoid RCU read > critical section, and more im

Re: [Patch bpf-next] sock_map: fix a potential use-after-free in sock_map_close()

2021-04-09 Thread John Fastabend
Cong Wang wrote: > On Thu, Apr 8, 2021 at 5:26 PM John Fastabend > wrote: > > > > Cong Wang wrote: > > > From: Cong Wang > > > > > > The last refcnt of the psock can be gone right after > > > sock_map_remove_links(), so sk_psock_stop() could trigger a UAF. > > > The reason why I placed sk_psock_

Re: [Patch bpf-next] sock_map: fix a potential use-after-free in sock_map_close()

2021-04-08 Thread Cong Wang
On Thu, Apr 8, 2021 at 5:26 PM John Fastabend wrote: > > Cong Wang wrote: > > From: Cong Wang > > > > The last refcnt of the psock can be gone right after > > sock_map_remove_links(), so sk_psock_stop() could trigger a UAF. > > The reason why I placed sk_psock_stop() there is to avoid RCU read >

RE: [Patch bpf-next] sock_map: fix a potential use-after-free in sock_map_close()

2021-04-08 Thread John Fastabend
Cong Wang wrote: > From: Cong Wang > > The last refcnt of the psock can be gone right after > sock_map_remove_links(), so sk_psock_stop() could trigger a UAF. > The reason why I placed sk_psock_stop() there is to avoid RCU read > critical section, and more importantly, some callee of > sock_map_r

[Patch bpf-next] sock_map: fix a potential use-after-free in sock_map_close()

2021-04-07 Thread Cong Wang
From: Cong Wang The last refcnt of the psock can be gone right after sock_map_remove_links(), so sk_psock_stop() could trigger a UAF. The reason why I placed sk_psock_stop() there is to avoid RCU read critical section, and more importantly, some callee of sock_map_remove_links() is supposed to be