lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 9 Jul 2019 19:36:10 -0700 From: Jakub Kicinski <jakub.kicinski@...ronome.com> To: John Fastabend <john.fastabend@...il.com> Cc: ast@...nel.org, daniel@...earbox.net, netdev@...r.kernel.org, edumazet@...gle.com, bpf@...r.kernel.org Subject: Re: [bpf PATCH v2 6/6] bpf: sockmap/tls, close can race with map free On Mon, 08 Jul 2019 19:15:18 +0000, John Fastabend wrote: > @@ -836,22 +841,39 @@ static int tls_init(struct sock *sk) There is a goto out above this which has to be turned into return 0; if out now releases the lock. > if (sk->sk_state != TCP_ESTABLISHED) > return -ENOTSUPP; > > + tls_build_proto(sk); > + > /* allocate tls context */ > + write_lock_bh(&sk->sk_callback_lock); > ctx = create_ctx(sk); > if (!ctx) { > rc = -ENOMEM; > goto out; > } > > - tls_build_proto(sk); > ctx->tx_conf = TLS_BASE; > ctx->rx_conf = TLS_BASE; > ctx->sk_proto = sk->sk_prot; > update_sk_prot(sk, ctx); > out: > + write_unlock_bh(&sk->sk_callback_lock); > return rc; > }
Powered by blists - more mailing lists