Re: [PATCH bpf] bpf, sockmap: fix sock_hash_alloc and reject zero-sized keys

2018-08-21 Thread Song Liu
On Tue, Aug 21, 2018 at 3:02 PM, Daniel Borkmann wrote: > Currently, it is possible to create a sock hash map with key size > of 0 and have the kernel return a fd back to user space. This is > invalid for hash maps (and kernel also hasn't been tested for zero > key size support in general at this

[PATCH bpf] bpf, sockmap: fix sock_hash_alloc and reject zero-sized keys

2018-08-21 Thread Daniel Borkmann
Currently, it is possible to create a sock hash map with key size of 0 and have the kernel return a fd back to user space. This is invalid for hash maps (and kernel also hasn't been tested for zero key size support in general at this point). Thus, reject such configuration. Fixes: 81110384441a ("b