Re: [bpf PATCH v2] bpf: avoid misuse of psock when TCP_ULP_BPF collides with another ULP

2018-09-02 Thread Daniel Borkmann
On 08/31/2018 06:25 AM, John Fastabend wrote: > Currently we check sk_user_data is non NULL to determine if the sk > exists in a map. However, this is not sufficient to ensure the psock > or the ULP ops are not in use by another user, such as kcm or TLS. To > avoid this when adding a sock to a map

[bpf PATCH v2] bpf: avoid misuse of psock when TCP_ULP_BPF collides with another ULP

2018-08-30 Thread John Fastabend
Currently we check sk_user_data is non NULL to determine if the sk exists in a map. However, this is not sufficient to ensure the psock or the ULP ops are not in use by another user, such as kcm or TLS. To avoid this when adding a sock to a map also verify it is of the correct ULP type. Additionall