Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
selinux: Fix error priority for bind with AF_UNSPEC on PF_INET6 socket
[ Upstream commit bbf5a1d ] The IPv6 network stack first checks the sockaddr length (-EINVAL error) before checking the family (-EAFNOSUPPORT error). This was discovered thanks to commit a549d05 ("selftests/landlock: Add network tests"). Cc: Eric Paris <[email protected]> Cc: Konstantin Meskhidze <[email protected]> Cc: Paul Moore <[email protected]> Cc: Stephen Smalley <[email protected]> Reported-by: Muhammad Usama Anjum <[email protected]> Closes: https://lore.kernel.org/r/[email protected] Fixes: 0f8db8c ("selinux: add AF_UNSPEC and INADDR_ANY checks to selinux_socket_bind()") Signed-off-by: Mickaël Salaün <[email protected]> Tested-by: Muhammad Usama Anjum <[email protected]> Signed-off-by: Paul Moore <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
- Loading branch information