diff options
author | Paul Moore <paul@paul-moore.com> | 2020-09-28 04:38:26 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2020-11-24 00:36:21 +0100 |
commit | 3df98d79215ace13d1e91ddfc5a67a0f5acbd83f (patch) | |
tree | 3e0db692f0d85f9a73ec0e2dd4298bda62f57b8b /net/ipv6/raw.c | |
parent | selinux: Fix fall-through warnings for Clang (diff) | |
download | linux-3df98d79215ace13d1e91ddfc5a67a0f5acbd83f.tar.xz linux-3df98d79215ace13d1e91ddfc5a67a0f5acbd83f.zip |
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>
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r-- | net/ipv6/raw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 6e4ab80a3b94..1f56d9aae589 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -915,7 +915,7 @@ static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) fl6.flowi6_oif = np->mcast_oif; else if (!fl6.flowi6_oif) fl6.flowi6_oif = np->ucast_oif; - security_sk_classify_flow(sk, flowi6_to_flowi(&fl6)); + security_sk_classify_flow(sk, flowi6_to_flowi_common(&fl6)); if (hdrincl) fl6.flowi6_flags |= FLOWI_FLAG_KNOWN_NH; |