selinux: Check address length before reading address family
authorTetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Fri, 12 Apr 2019 10:59:34 +0000 (19:59 +0900)
committerPaul Moore <paul@paul-moore.com>
Mon, 15 Apr 2019 16:42:06 +0000 (12:42 -0400)
commitc750e6929d3c76d13d1d0ba475989d6dd74785d5
tree359f0254a7f431ce565de023339b2ee3e8cf6be4
parent1537ad15c9c59ce852748578eb5633139053e86b
selinux: Check address length before reading address family

KMSAN will complain if valid address length passed to bind()/connect() is
shorter than sizeof("struct sockaddr"->sa_family) bytes.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/hooks.c