linux/net/netlabel
Paul Moore 6a8b7f0c85 netlabel: use domain based selectors when address based selectors are not available
NetLabel has the ability to selectively assign network security labels
to outbound traffic based on either the LSM's "domain" (different for
each LSM), the network destination, or a combination of both.  Depending
on the type of traffic, local or forwarded, and the type of traffic
selector, domain or address based, different hooks are used to label the
traffic; the goal being minimal overhead.

Unfortunately, there is a bug such that a system using NetLabel domain
based traffic selectors does not correctly label outbound local traffic
that is not assigned to a socket.  The issue is that in these cases
the associated NetLabel hook only looks at the address based selectors
and not the domain based selectors.  This patch corrects this by
checking both the domain and address based selectors so that the correct
labeling is applied, regardless of the configuration type.

In order to acomplish this fix, this patch also simplifies some of the
NetLabel domainhash structures to use a more common outbound traffic
mapping type: struct netlbl_dommap_def.  This simplifies some of the code
in this patch and paves the way for further simplifications in the
future.

Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-02 16:57:01 -07:00
..
Kconfig
Makefile
netlabel_addrlist.c net: use IS_ENABLED(CONFIG_IPV6) 2011-12-11 18:25:16 -05:00
netlabel_addrlist.h net: use IS_ENABLED(CONFIG_IPV6) 2011-12-11 18:25:16 -05:00
netlabel_cipso_v4.c netlabel: use domain based selectors when address based selectors are not available 2013-08-02 16:57:01 -07:00
netlabel_cipso_v4.h
netlabel_domainhash.c netlabel: use domain based selectors when address based selectors are not available 2013-08-02 16:57:01 -07:00
netlabel_domainhash.h netlabel: use domain based selectors when address based selectors are not available 2013-08-02 16:57:01 -07:00
netlabel_kapi.c netlabel: use domain based selectors when address based selectors are not available 2013-08-02 16:57:01 -07:00
netlabel_mgmt.c netlabel: use domain based selectors when address based selectors are not available 2013-08-02 16:57:01 -07:00
netlabel_mgmt.h
netlabel_unlabeled.c netlabel: use domain based selectors when address based selectors are not available 2013-08-02 16:57:01 -07:00
netlabel_unlabeled.h
netlabel_user.c userns: Convert the audit loginuid to be a kuid 2012-09-17 18:08:54 -07:00
netlabel_user.h