]> git.baikalelectronics.ru Git - kernel.git/commit
lsm,selinux: pass flowi_common instead of flowi to the LSM hooks
authorPaul Moore <paul@paul-moore.com>
Mon, 28 Sep 2020 02:38:26 +0000 (22:38 -0400)
committerPaul Moore <paul@paul-moore.com>
Mon, 23 Nov 2020 23:36:21 +0000 (18:36 -0500)
commit6149be2504f6d065386a9748c33e681a60c6e58f
tree3e0db692f0d85f9a73ec0e2dd4298bda62f57b8b
parent26c624f9e250471f23f447c8d27ea920bf97baf7
lsm,selinux: pass flowi_common instead of flowi to the LSM hooks

As pointed out by Herbert in a recent related patch, the LSM hooks do
not have the necessary address family information to use the flowi
struct safely.  As none of the LSMs currently use any of the protocol
specific flowi information, replace the flowi pointers with pointers
to the address family independent flowi_common struct.

Reported-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: James Morris <jamorris@linux.microsoft.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
33 files changed:
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
drivers/net/wireguard/socket.c
include/linux/lsm_hook_defs.h
include/linux/lsm_hooks.h
include/linux/security.h
include/net/flow.h
include/net/route.h
net/dccp/ipv4.c
net/dccp/ipv6.c
net/ipv4/icmp.c
net/ipv4/inet_connection_sock.c
net/ipv4/ip_output.c
net/ipv4/ping.c
net/ipv4/raw.c
net/ipv4/syncookies.c
net/ipv4/udp.c
net/ipv6/af_inet6.c
net/ipv6/datagram.c
net/ipv6/icmp.c
net/ipv6/inet6_connection_sock.c
net/ipv6/netfilter/nf_reject_ipv6.c
net/ipv6/ping.c
net/ipv6/raw.c
net/ipv6/syncookies.c
net/ipv6/tcp_ipv6.c
net/ipv6/udp.c
net/l2tp/l2tp_ip6.c
net/netfilter/nf_synproxy_core.c
net/xfrm/xfrm_state.c
security/security.c
security/selinux/hooks.c
security/selinux/include/xfrm.h
security/selinux/xfrm.c