aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss/services.c
diff options
context:
space:
mode:
authorAlexey Kodanev <alexey.kodanev@oracle.com>2018-05-11 20:15:12 +0300
committerPaul Moore <paul@paul-moore.com>2018-05-14 15:19:25 -0400
commit88b7d370bb4b1280717ebdacd6748456f9ba484f (patch)
treeb39eaeabeabb993ffcfffe9fb6f566a32ad4975a /security/selinux/ss/services.c
parentselinux: add AF_UNSPEC and INADDR_ANY checks to selinux_socket_bind() (diff)
downloadlinux-dev-88b7d370bb4b1280717ebdacd6748456f9ba484f.tar.xz
linux-dev-88b7d370bb4b1280717ebdacd6748456f9ba484f.zip
selinux: fix address family in bind() and connect() to match address/port
Since sctp_bindx() and sctp_connectx() can have multiple addresses, sk_family can differ from sa_family. Therefore, selinux_socket_bind() and selinux_socket_connect_helper(), which process sockaddr structure (address and port), should use the address family from that structure too, and not from the socket one. The initialization of the data for the audit record is moved above, in selinux_socket_bind(), so that there is no duplicate changes and code. Fixes: d452930fd3b9 ("selinux: Add SCTP support") Suggested-by: Paul Moore <paul@paul-moore.com> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/services.c')
0 files changed, 0 insertions, 0 deletions