diff options
author | Ondrej Mosnacek <omosnace@redhat.com> | 2022-02-12 18:59:21 +0100 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2022-02-15 21:03:38 +0100 |
commit | 5e50f5d4ff31e95599d695df1f0a4e7d2d6fef99 (patch) | |
tree | 8ec2ea7d582c38e6fe8d1d78dcb63d0d04f44088 /security | |
parent | selinux: parse contexts for mount options early (diff) | |
download | linux-5e50f5d4ff31e95599d695df1f0a4e7d2d6fef99.tar.xz linux-5e50f5d4ff31e95599d695df1f0a4e7d2d6fef99.zip |
security: add sctp_assoc_established hook
security_sctp_assoc_established() is added to replace
security_inet_conn_established() called in
sctp_sf_do_5_1E_ca(), so that asoc can be accessed in security
subsystem and save the peer secid to asoc->peer_secid.
Fixes: 72e89f50084c ("security: Add support for SCTP security hooks")
Reported-by: Prashanth Prahlad <pprahlad@redhat.com>
Based-on-patch-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Tested-by: Richard Haines <richard_c_haines@btinternet.com>
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/security.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/security/security.c b/security/security.c index e649c8691be2..9663ffcca4b0 100644 --- a/security/security.c +++ b/security/security.c @@ -2393,6 +2393,13 @@ void security_sctp_sk_clone(struct sctp_association *asoc, struct sock *sk, } EXPORT_SYMBOL(security_sctp_sk_clone); +int security_sctp_assoc_established(struct sctp_association *asoc, + struct sk_buff *skb) +{ + return call_int_hook(sctp_assoc_established, 0, asoc, skb); +} +EXPORT_SYMBOL(security_sctp_assoc_established); + #endif /* CONFIG_SECURITY_NETWORK */ #ifdef CONFIG_SECURITY_INFINIBAND |