We have several protocol methods - pru_bind, pru_connect and pru_send -
which take a sockaddr as input. Protocols are required to validate the
sockaddr family and length, but in many cases this was not happening, or
was being done too late.
This diff adds requisite checks to various protocol entry points and in
some cases replaces existing checks with assertions. For now they are
open-coded but we should probably have a per-AF routine to do this.
Initially, though, let's make sure that we have sufficient checking.
Reported by: KASAN