diff options
author | Alexey Kodanev <alexey.kodanev@oracle.com> | 2018-05-11 20:15:11 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2018-05-14 15:17:02 -0400 |
commit | 0f8db8cc73df60b3de9a5eebd8f117b56eff5b03 (patch) | |
tree | c890791d42e34d4dcb9bad3307143246a13adb81 /security/yama | |
parent | 6b6bc6205d98796361962ee282a063f18ba8dc57 (diff) | |
download | linux-0f8db8cc73df60b3de9a5eebd8f117b56eff5b03.tar.bz2 |
selinux: add AF_UNSPEC and INADDR_ANY checks to selinux_socket_bind()
Commit d452930fd3b9 ("selinux: Add SCTP support") breaks compatibility
with the old programs that can pass sockaddr_in structure with AF_UNSPEC
and INADDR_ANY to bind(). As a result, bind() returns EAFNOSUPPORT error.
This was found with LTP/asapi_01 test.
Similar to commit 29c486df6a20 ("net: ipv4: relax AF_INET check in
bind()"), which relaxed AF_INET check for compatibility, add AF_UNSPEC
case to AF_INET and make sure that the address is INADDR_ANY.
Fixes: d452930fd3b9 ("selinux: Add SCTP support")
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/yama')
0 files changed, 0 insertions, 0 deletions