diff options
author | 2019-04-12 19:59:35 +0900 | |
---|---|---|
committer | 2019-04-29 17:32:27 -0700 | |
commit | b9ef5513c99bf9c8bfd9c9e8051b67f52b2dee1e (patch) | |
tree | d168ccc0225f3ab3fd890a893a5813dfd4f27065 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Smack: Fix IPv6 handling of 0 secmark (diff) | |
download | wireguard-linux-b9ef5513c99bf9c8bfd9c9e8051b67f52b2dee1e.tar.xz wireguard-linux-b9ef5513c99bf9c8bfd9c9e8051b67f52b2dee1e.zip |
smack: Check address length before reading address family
KMSAN will complain if valid address length passed to bind()/connect()/
sendmsg() is shorter than sizeof("struct sockaddr"->sa_family) bytes.
Also, since smk_ipv6_port_label()/smack_netlabel_send()/
smack_ipv6host_label()/smk_ipv6_check()/smk_ipv6_port_check() are not
checking valid address length and/or address family, make sure we check
both. The minimal valid length in smack_socket_connect() is changed from
sizeof(struct sockaddr_in6) bytes to SIN6_LEN_RFC2133 bytes, for it seems
that Smack is not using "struct sockaddr_in6"->sin6_scope_id field.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions