security: add sctp_assoc_established hook
authorOndrej Mosnacek <omosnace@redhat.com>
Sat, 12 Feb 2022 17:59:21 +0000 (18:59 +0100)
committerPaul Moore <paul@paul-moore.com>
Tue, 15 Feb 2022 20:03:38 +0000 (15:03 -0500)
commit5e50f5d4ff31e95599d695df1f0a4e7d2d6fef99
tree8ec2ea7d582c38e6fe8d1d78dcb63d0d04f44088
parent70f4169ab421b277caf7429e84f468d8c47aa00a
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>
Documentation/security/SCTP.rst
include/linux/lsm_hook_defs.h
include/linux/lsm_hooks.h
include/linux/security.h
net/sctp/sm_statefuns.c
security/security.c