54 lines · plain
1========================================2NetLabel Linux Security Module Interface3========================================4 5Paul Moore, paul.moore@hp.com6 7May 17, 20068 9Overview10========11 12NetLabel is a mechanism which can set and retrieve security attributes from13network packets. It is intended to be used by LSM developers who want to make14use of a common code base for several different packet labeling protocols.15The NetLabel security module API is defined in 'include/net/netlabel.h' but a16brief overview is given below.17 18NetLabel Security Attributes19============================20 21Since NetLabel supports multiple different packet labeling protocols and LSMs22it uses the concept of security attributes to refer to the packet's security23labels. The NetLabel security attributes are defined by the24'netlbl_lsm_secattr' structure in the NetLabel header file. Internally the25NetLabel subsystem converts the security attributes to and from the correct26low-level packet label depending on the NetLabel build time and run time27configuration. It is up to the LSM developer to translate the NetLabel28security attributes into whatever security identifiers are in use for their29particular LSM.30 31NetLabel LSM Protocol Operations32================================33 34These are the functions which allow the LSM developer to manipulate the labels35on outgoing packets as well as read the labels on incoming packets. Functions36exist to operate both on sockets as well as the sk_buffs directly. These high37level functions are translated into low level protocol operations based on how38the administrator has configured the NetLabel subsystem.39 40NetLabel Label Mapping Cache Operations41=======================================42 43Depending on the exact configuration, translation between the network packet44label and the internal LSM security identifier can be time consuming. The45NetLabel label mapping cache is a caching mechanism which can be used to46sidestep much of this overhead once a mapping has been established. Once the47LSM has received a packet, used NetLabel to decode its security attributes,48and translated the security attributes into a LSM internal identifier the LSM49can use the NetLabel caching functions to associate the LSM internal50identifier with the network packet's label. This means that in the future51when a incoming packet matches a cached value not only are the internal52NetLabel translation mechanisms bypassed but the LSM translation mechanisms are53bypassed as well which should result in a significant reduction in overhead.54