/security/selinux/ |
D | netlink.c | 71 struct sk_buff *skb; in selnl_notify() local 76 skb = nlmsg_new(len, GFP_USER); in selnl_notify() 77 if (!skb) in selnl_notify() 80 tmp = skb->tail; in selnl_notify() 81 nlh = nlmsg_put(skb, 0, 0, msgtype, len, 0); in selnl_notify() 85 nlh->nlmsg_len = skb->tail - tmp; in selnl_notify() 86 NETLINK_CB(skb).dst_group = SELNLGRP_AVC; in selnl_notify() 87 netlink_broadcast(selnl, skb, 0, SELNLGRP_AVC, GFP_USER); in selnl_notify() 92 kfree_skb(skb); in selnl_notify()
|
D | netlabel.c | 41 static int selinux_netlbl_sidlookup_cached(struct sk_buff *skb, in selinux_netlbl_sidlookup_cached() argument 52 netlbl_cache_add(skb, family, secattr); in selinux_netlbl_sidlookup_cached() 141 void selinux_netlbl_err(struct sk_buff *skb, u16 family, int error, int gateway) in selinux_netlbl_err() argument 143 netlbl_skbuff_err(skb, family, error, gateway); in selinux_netlbl_err() 188 int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, in selinux_netlbl_skbuff_getsid() argument 202 rc = netlbl_skbuff_getattr(skb, family, &secattr); in selinux_netlbl_skbuff_getsid() 204 rc = selinux_netlbl_sidlookup_cached(skb, family, in selinux_netlbl_skbuff_getsid() 225 int selinux_netlbl_skbuff_setsid(struct sk_buff *skb, in selinux_netlbl_skbuff_setsid() argument 236 sk = skb_to_full_sk(skb); in selinux_netlbl_skbuff_setsid() 253 rc = netlbl_skbuff_setattr(skb, family, secattr); in selinux_netlbl_skbuff_setsid() [all …]
|
D | xfrm.c | 212 static u32 selinux_xfrm_skb_sid_egress(struct sk_buff *skb) in selinux_xfrm_skb_sid_egress() argument 214 struct dst_entry *dst = skb_dst(skb); in selinux_xfrm_skb_sid_egress() 226 static int selinux_xfrm_skb_sid_ingress(struct sk_buff *skb, in selinux_xfrm_skb_sid_ingress() argument 230 struct sec_path *sp = skb_sec_path(skb); in selinux_xfrm_skb_sid_ingress() 261 int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall) in selinux_xfrm_decode_session() argument 263 if (skb == NULL) { in selinux_xfrm_decode_session() 267 return selinux_xfrm_skb_sid_ingress(skb, sid, ckall); in selinux_xfrm_decode_session() 270 int selinux_xfrm_skb_sid(struct sk_buff *skb, u32 *sid) in selinux_xfrm_skb_sid() argument 274 rc = selinux_xfrm_skb_sid_ingress(skb, sid, 0); in selinux_xfrm_skb_sid() 276 *sid = selinux_xfrm_skb_sid_egress(skb); in selinux_xfrm_skb_sid() [all …]
|
D | hooks.c | 4167 static int selinux_parse_skb_ipv4(struct sk_buff *skb, in selinux_parse_skb_ipv4() argument 4173 offset = skb_network_offset(skb); in selinux_parse_skb_ipv4() 4174 ih = skb_header_pointer(skb, offset, sizeof(_iph), &_iph); in selinux_parse_skb_ipv4() 4197 th = skb_header_pointer(skb, offset, sizeof(_tcph), &_tcph); in selinux_parse_skb_ipv4() 4213 uh = skb_header_pointer(skb, offset, sizeof(_udph), &_udph); in selinux_parse_skb_ipv4() 4229 dh = skb_header_pointer(skb, offset, sizeof(_dccph), &_dccph); in selinux_parse_skb_ipv4() 4246 sh = skb_header_pointer(skb, offset, sizeof(_sctph), &_sctph); in selinux_parse_skb_ipv4() 4265 static int selinux_parse_skb_ipv6(struct sk_buff *skb, in selinux_parse_skb_ipv6() argument 4273 offset = skb_network_offset(skb); in selinux_parse_skb_ipv6() 4274 ip6 = skb_header_pointer(skb, offset, sizeof(_ipv6h), &_ipv6h); in selinux_parse_skb_ipv6() [all …]
|
/security/selinux/include/ |
D | netlabel.h | 29 void selinux_netlbl_err(struct sk_buff *skb, u16 family, int error, 35 int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, 39 int selinux_netlbl_skbuff_setsid(struct sk_buff *skb, 43 struct sk_buff *skb); 49 struct sk_buff *skb, 65 static inline void selinux_netlbl_err(struct sk_buff *skb, in selinux_netlbl_err() argument 85 static inline int selinux_netlbl_skbuff_getsid(struct sk_buff *skb, in selinux_netlbl_skbuff_getsid() argument 94 static inline int selinux_netlbl_skbuff_setsid(struct sk_buff *skb, in selinux_netlbl_skbuff_setsid() argument 108 struct sk_buff *skb) in selinux_netlbl_sctp_assoc_request() argument 132 struct sk_buff *skb, in selinux_netlbl_sock_rcv_skb() argument
|
D | xfrm.h | 39 int selinux_xfrm_sock_rcv_skb(u32 sk_sid, struct sk_buff *skb, 41 int selinux_xfrm_postroute_last(u32 sk_sid, struct sk_buff *skb, 43 int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall); 44 int selinux_xfrm_skb_sid(struct sk_buff *skb, u32 *sid); 61 static inline int selinux_xfrm_sock_rcv_skb(u32 sk_sid, struct sk_buff *skb, in selinux_xfrm_sock_rcv_skb() argument 67 static inline int selinux_xfrm_postroute_last(u32 sk_sid, struct sk_buff *skb, in selinux_xfrm_postroute_last() argument 74 static inline int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, in selinux_xfrm_decode_session() argument 85 static inline int selinux_xfrm_skb_sid(struct sk_buff *skb, u32 *sid) in selinux_xfrm_skb_sid() argument
|
/security/smack/ |
D | smack_netfilter.c | 24 struct sk_buff *skb, in smack_ipv6_output() argument 27 struct sock *sk = skb_to_full_sk(skb); in smack_ipv6_output() 34 skb->secmark = skp->smk_secid; in smack_ipv6_output() 42 struct sk_buff *skb, in smack_ipv4_output() argument 45 struct sock *sk = skb_to_full_sk(skb); in smack_ipv4_output() 52 skb->secmark = skp->smk_secid; in smack_ipv4_output()
|
D | smack_lsm.c | 3790 static int smk_skb_to_addr_ipv6(struct sk_buff *skb, struct sockaddr_in6 *sip) in smk_skb_to_addr_ipv6() argument 3804 offset = skb_network_offset(skb); in smk_skb_to_addr_ipv6() 3805 ip6 = skb_header_pointer(skb, offset, sizeof(_ipv6h), &_ipv6h); in smk_skb_to_addr_ipv6() 3812 offset = ipv6_skip_exthdr(skb, offset, &nexthdr, &frag_off); in smk_skb_to_addr_ipv6() 3819 th = skb_header_pointer(skb, offset, sizeof(_tcph), &_tcph); in smk_skb_to_addr_ipv6() 3825 uh = skb_header_pointer(skb, offset, sizeof(_udph), &_udph); in smk_skb_to_addr_ipv6() 3830 dh = skb_header_pointer(skb, offset, sizeof(_dccph), &_dccph); in smk_skb_to_addr_ipv6() 3846 static int smack_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) in smack_socket_sock_rcv_skb() argument 3861 if (family == PF_INET6 && skb->protocol == htons(ETH_P_IP)) in smack_socket_sock_rcv_skb() 3873 if (skb && skb->secmark != 0) { in smack_socket_sock_rcv_skb() [all …]
|
/security/ |
D | lsm_audit.c | 39 int ipv4_skb_to_auditdata(struct sk_buff *skb, in ipv4_skb_to_auditdata() argument 45 ih = ip_hdr(skb); in ipv4_skb_to_auditdata() 60 struct tcphdr *th = tcp_hdr(skb); in ipv4_skb_to_auditdata() 69 struct udphdr *uh = udp_hdr(skb); in ipv4_skb_to_auditdata() 78 struct dccp_hdr *dh = dccp_hdr(skb); in ipv4_skb_to_auditdata() 87 struct sctphdr *sh = sctp_hdr(skb); in ipv4_skb_to_auditdata() 108 int ipv6_skb_to_auditdata(struct sk_buff *skb, in ipv6_skb_to_auditdata() argument 116 ip6 = ipv6_hdr(skb); in ipv6_skb_to_auditdata() 124 offset = skb_network_offset(skb); in ipv6_skb_to_auditdata() 127 offset = ipv6_skip_exthdr(skb, offset, &nexthdr, &frag_off); in ipv6_skb_to_auditdata() [all …]
|
D | security.c | 1905 int security_netlink_send(struct sock *sk, struct sk_buff *skb) in security_netlink_send() argument 1907 return call_int_hook(netlink_send, 0, sk, skb); in security_netlink_send() 2048 int security_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) in security_sock_rcv_skb() argument 2050 return call_int_hook(socket_sock_rcv_skb, 0, sk, skb); in security_sock_rcv_skb() 2061 int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) in security_socket_getpeersec_dgram() argument 2064 skb, secid); in security_socket_getpeersec_dgram() 2103 struct sk_buff *skb, struct request_sock *req) in security_inet_conn_request() argument 2105 return call_int_hook(inet_conn_request, 0, sk, skb, req); in security_inet_conn_request() 2116 struct sk_buff *skb) in security_inet_conn_established() argument 2118 call_void_hook(inet_conn_established, sk, skb); in security_inet_conn_established() [all …]
|
/security/apparmor/ |
D | lsm.c | 1026 static int apparmor_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) in apparmor_socket_sock_rcv_skb() argument 1030 if (!skb->secmark) in apparmor_socket_sock_rcv_skb() 1034 skb->secmark, sk); in apparmor_socket_sock_rcv_skb() 1105 struct sk_buff *skb, u32 *secid) in apparmor_socket_getpeersec_dgram() argument 1132 static int apparmor_inet_conn_request(struct sock *sk, struct sk_buff *skb, in apparmor_inet_conn_request() argument 1137 if (!skb->secmark) in apparmor_inet_conn_request() 1141 skb->secmark, sk); in apparmor_inet_conn_request() 1614 struct sk_buff *skb, in apparmor_ip_postroute() argument 1620 if (!skb->secmark) in apparmor_ip_postroute() 1623 sk = skb_to_full_sk(skb); in apparmor_ip_postroute() [all …]
|