1
0
Fork 0

sctp: label accepted/peeled off sockets

Accepted or peeled off sockets were missing a security label (e.g.
SELinux) which means that socket was in "unlabeled" state.

This patch clones the sock's label from the parent sock and resolves the
issue (similar to AF_BLUETOOTH protocol family).

Cc: Paul Moore <pmoore@redhat.com>
Cc: David Teigland <teigland@redhat.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
hifive-unleashed-5.1
Marcelo Ricardo Leitner 2015-12-23 16:44:09 -02:00 committed by David S. Miller
parent 9ba0b9636d
commit 3538a5c8ff
1 changed files with 2 additions and 0 deletions

View File

@ -7202,6 +7202,8 @@ void sctp_copy_sock(struct sock *newsk, struct sock *sk,
if (newsk->sk_flags & SK_FLAGS_TIMESTAMP)
net_enable_timestamp();
security_sk_clone(sk, newsk);
}
static inline void sctp_copy_descendant(struct sock *sk_to,