lsm,selinux: pass flowi_common instead of flowi to the LSM hooks
[ Upstream commit 3df98d79215ace13d1e91ddfc5a67a0f5acbd83f ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
a67a1661cf
commit
6950ee32c1
@@ -5448,9 +5448,9 @@ static void selinux_secmark_refcount_dec(void)
|
||||
}
|
||||
|
||||
static void selinux_req_classify_flow(const struct request_sock *req,
|
||||
struct flowi *fl)
|
||||
struct flowi_common *flic)
|
||||
{
|
||||
fl->flowi_secid = req->secid;
|
||||
flic->flowic_secid = req->secid;
|
||||
}
|
||||
|
||||
static int selinux_tun_dev_alloc_security(void **security)
|
||||
|
Reference in New Issue
Block a user