selinux: look for IPsec labels on both inbound and outbound packets
Previously selinux_skb_peerlbl_sid() would only check for labeled IPsec security labels on inbound packets, this patch enables it to check both inbound and outbound traffic for labeled IPsec security labels. Reported-by: Janak Desai <Janak.Desai@gtri.gatech.edu> Cc: stable@vger.kernel.org Signed-off-by: Paul Moore <pmoore@redhat.com>
This commit is contained in:
@@ -3829,7 +3829,7 @@ static int selinux_skb_peerlbl_sid(struct sk_buff *skb, u16 family, u32 *sid)
|
||||
u32 nlbl_sid;
|
||||
u32 nlbl_type;
|
||||
|
||||
err = selinux_skb_xfrm_sid(skb, &xfrm_sid);
|
||||
err = selinux_xfrm_skb_sid(skb, &xfrm_sid);
|
||||
if (unlikely(err))
|
||||
return -EACCES;
|
||||
err = selinux_netlbl_skbuff_getsid(skb, family, &nlbl_type, &nlbl_sid);
|
||||
|
Reference in New Issue
Block a user