summaryrefslogtreecommitdiff
path: root/block/blk-merge.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2019-04-12 19:59:35 +0900
committerCasey Schaufler <casey@schaufler-ca.com>2019-04-29 17:32:27 -0700
commitb9ef5513c99bf9c8bfd9c9e8051b67f52b2dee1e (patch)
treed168ccc0225f3ab3fd890a893a5813dfd4f27065 /block/blk-merge.c
parentf7450bc6e76860564f3842a41892f9b74313cc23 (diff)
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 'block/blk-merge.c')
0 files changed, 0 insertions, 0 deletions