Home
last modified time | relevance | path

Searched hist:"0 f8db8cc73df60b3de9a5eebd8f117b56eff5b03" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/security/selinux/
H A Dhooks.cdiff 0f8db8cc73df60b3de9a5eebd8f117b56eff5b03 Fri May 11 12:15:11 CDT 2018 Alexey Kodanev <alexey.kodanev@oracle.com> 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>