Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / Documentation / netlabel / cipso_ipv4.txt
1 NetLabel CIPSO/IPv4 Protocol Engine
2 ==============================================================================
3 Paul Moore, paul.moore@hp.com
4
5 May 17, 2006
6
7  * Overview
8
9 The NetLabel CIPSO/IPv4 protocol engine is based on the IETF Commercial
10 IP Security Option (CIPSO) draft from July 16, 1992.  A copy of this
11 draft can be found in this directory
12 (draft-ietf-cipso-ipsecurity-01.txt).  While the IETF draft never made
13 it to an RFC standard it has become a de-facto standard for labeled
14 networking and is used in many trusted operating systems.
15
16  * Outbound Packet Processing
17
18 The CIPSO/IPv4 protocol engine applies the CIPSO IP option to packets by
19 adding the CIPSO label to the socket.  This causes all packets leaving the
20 system through the socket to have the CIPSO IP option applied.  The socket's
21 CIPSO label can be changed at any point in time, however, it is recommended
22 that it is set upon the socket's creation.  The LSM can set the socket's CIPSO
23 label by using the NetLabel security module API; if the NetLabel "domain" is
24 configured to use CIPSO for packet labeling then a CIPSO IP option will be
25 generated and attached to the socket.
26
27  * Inbound Packet Processing
28
29 The CIPSO/IPv4 protocol engine validates every CIPSO IP option it finds at the
30 IP layer without any special handling required by the LSM.  However, in order
31 to decode and translate the CIPSO label on the packet the LSM must use the
32 NetLabel security module API to extract the security attributes of the packet.
33 This is typically done at the socket layer using the 'socket_sock_rcv_skb()'
34 LSM hook.
35
36  * Label Translation
37
38 The CIPSO/IPv4 protocol engine contains a mechanism to translate CIPSO security
39 attributes such as sensitivity level and category to values which are
40 appropriate for the host.  These mappings are defined as part of a CIPSO
41 Domain Of Interpretation (DOI) definition and are configured through the
42 NetLabel user space communication layer.  Each DOI definition can have a
43 different security attribute mapping table.
44
45  * Label Translation Cache
46
47 The NetLabel system provides a framework for caching security attribute
48 mappings from the network labels to the corresponding LSM identifiers.  The
49 CIPSO/IPv4 protocol engine supports this caching mechanism.