<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/netlabel/netlabel_kapi.c, branch linux-2.6.33.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-07-31T02:22:43Z</updated>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2009-07-31T02:22:43Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2009-07-31T02:22:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df597efb5737063497f1a4f7c996cc9aec294230'/>
<id>urn:sha1:df597efb5737063497f1a4f7c996cc9aec294230</id>
<content type='text'>
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-3945.h
	drivers/net/wireless/iwlwifi/iwl-tx.c
	drivers/net/wireless/iwlwifi/iwl3945-base.c
</content>
</entry>
<entry>
<title>net/netlabel: Add kmalloc NULL tests</title>
<updated>2009-07-30T17:58:28Z</updated>
<author>
<name>Julia Lawall</name>
</author>
<published>2009-07-30T04:38:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ca7daea612b480ecf0fc5bd1630b88447fe73fc5'/>
<id>urn:sha1:ca7daea612b480ecf0fc5bd1630b88447fe73fc5</id>
<content type='text'>
The test on map4 should be a test on map6.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// &lt;smpl&gt;
@@
expression *x;
identifier f;
constant char *C;
@@

x = \(kmalloc\|kcalloc\|kzalloc\)(...);
... when != x == NULL
    when != x != NULL
    when != (x || ...)
(
kfree(x)
|
f(...,C,...,x,...)
|
*f(...,x,...)
|
*x-&gt;f
)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Acked-by: Paul Moore &lt;paul.moore@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/netlabel: Correct redundant test</title>
<updated>2009-07-27T18:35:29Z</updated>
<author>
<name>Julia Lawall</name>
</author>
<published>2009-07-27T06:15:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=479432344420bc9a868088e346fecb6765e2b674'/>
<id>urn:sha1:479432344420bc9a868088e346fecb6765e2b674</id>
<content type='text'>
entry was tested for NULL near the beginning of the function, followed by a
return, and there is no intervening modification of its value.

A simplified version of the semantic match that finds this problem is as
follows: (http://www.emn.fr/x-info/coccinelle/)

// &lt;smpl&gt;
@r exists@
local idexpression x;
expression E;
position p1,p2;
@@

if (x == NULL || ...) { ... when forall
   return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&amp;=E\|&amp;x\)
(
*x == NULL
|
*x != NULL
)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Acked-by: Paul Moore &lt;paul.moore@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netlabel: Cleanup the Smack/NetLabel code to fix incoming TCP connections</title>
<updated>2009-03-28T04:01:37Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2009-03-27T21:10:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07feee8f812f7327a46186f7604df312c8c81962'/>
<id>urn:sha1:07feee8f812f7327a46186f7604df312c8c81962</id>
<content type='text'>
This patch cleans up a lot of the Smack network access control code.  The
largest changes are to fix the labeling of incoming TCP connections in a
manner similar to the recent SELinux changes which use the
security_inet_conn_request() hook to label the request_sock and let the label
move to the child socket via the normal network stack mechanisms.  In addition
to the incoming TCP connection fixes this patch also removes the smk_labled
field from the socket_smack struct as the minor optimization advantage was
outweighed by the difficulty in maintaining it's proper state.

Signed-off-by: Paul Moore &lt;paul.moore@hp.com&gt;
Acked-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>netlabel: Label incoming TCP connections correctly in SELinux</title>
<updated>2009-03-28T04:01:36Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2009-03-27T21:10:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=389fb800ac8be2832efedd19978a2b8ced37eb61'/>
<id>urn:sha1:389fb800ac8be2832efedd19978a2b8ced37eb61</id>
<content type='text'>
The current NetLabel/SELinux behavior for incoming TCP connections works but
only through a series of happy coincidences that rely on the limited nature of
standard CIPSO (only able to convey MLS attributes) and the write equality
imposed by the SELinux MLS constraints.  The problem is that network sockets
created as the result of an incoming TCP connection were not on-the-wire
labeled based on the security attributes of the parent socket but rather based
on the wire label of the remote peer.  The issue had to do with how IP options
were managed as part of the network stack and where the LSM hooks were in
relation to the code which set the IP options on these newly created child
sockets.  While NetLabel/SELinux did correctly set the socket's on-the-wire
label it was promptly cleared by the network stack and reset based on the IP
options of the remote peer.

This patch, in conjunction with a prior patch that adjusted the LSM hook
locations, works to set the correct on-the-wire label format for new incoming
connections through the security_inet_conn_request() hook.  Besides the
correct behavior there are many advantages to this change, the most significant
is that all of the NetLabel socket labeling code in SELinux now lives in hooks
which can return error codes to the core stack which allows us to finally get
ride of the selinux_netlbl_inode_permission() logic which greatly simplfies
the NetLabel/SELinux glue code.  In the process of developing this patch I
also ran into a small handful of AF_INET6 cleanliness issues that have been
fixed which should make the code safer and easier to extend in the future.

Signed-off-by: Paul Moore &lt;paul.moore@hp.com&gt;
Acked-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>netlabel: Update kernel configuration API</title>
<updated>2008-12-31T17:54:11Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2008-12-31T17:54:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c2e8ac0953fccdd24dc6c4b9e08e8f1cd68cf07'/>
<id>urn:sha1:6c2e8ac0953fccdd24dc6c4b9e08e8f1cd68cf07</id>
<content type='text'>
Update the NetLabel kernel API to expose the new features added in kernel
releases 2.6.25 and 2.6.28: the static/fallback label functionality and network
address based selectors.

Signed-off-by: Paul Moore &lt;paul.moore@hp.com&gt;
</content>
</entry>
<entry>
<title>netlabel: Add configuration support for local labeling</title>
<updated>2008-10-10T14:16:34Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2008-10-10T14:16:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d91d40799165b0c84c97e7c71fb8039494ff07dc'/>
<id>urn:sha1:d91d40799165b0c84c97e7c71fb8039494ff07dc</id>
<content type='text'>
Add the necessary NetLabel support for the new CIPSO mapping,
CIPSO_V4_MAP_LOCAL, which allows full LSM label/context support.

Signed-off-by: Paul Moore &lt;paul.moore@hp.com&gt;
Reviewed-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>cipso: Add support for native local labeling and fixup mapping names</title>
<updated>2008-10-10T14:16:34Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2008-10-10T14:16:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=15c45f7b2e81655f6eb500ec949c8bd70a04325a'/>
<id>urn:sha1:15c45f7b2e81655f6eb500ec949c8bd70a04325a</id>
<content type='text'>
This patch accomplishes three minor tasks: add a new tag type for local
labeling, rename the CIPSO_V4_MAP_STD define to CIPSO_V4_MAP_TRANS and
replace some of the CIPSO "magic numbers" with constants from the header
file.  The first change allows CIPSO to support full LSM labels/contexts,
not just MLS attributes.  The second change brings the mapping names inline
with what userspace is using, compatibility is preserved since we don't
actually change the value.  The last change is to aid readability and help
prevent mistakes.

Signed-off-by: Paul Moore &lt;paul.moore@hp.com&gt;
</content>
</entry>
<entry>
<title>selinux: Set socket NetLabel based on connection endpoint</title>
<updated>2008-10-10T14:16:33Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2008-10-10T14:16:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=014ab19a69c325f52d7bae54ceeda73d6307ae0c'/>
<id>urn:sha1:014ab19a69c325f52d7bae54ceeda73d6307ae0c</id>
<content type='text'>
Previous work enabled the use of address based NetLabel selectors, which while
highly useful, brought the potential for additional per-packet overhead when
used.  This patch attempts to solve that by applying NetLabel socket labels
when sockets are connect()'d.  This should alleviate the per-packet NetLabel
labeling for all connected sockets (yes, it even works for connected DGRAM
sockets).

Signed-off-by: Paul Moore &lt;paul.moore@hp.com&gt;
Reviewed-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>netlabel: Add functionality to set the security attributes of a packet</title>
<updated>2008-10-10T14:16:32Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2008-10-10T14:16:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=948bf85c1bc9a84754786a9d5dd99b7ecc46451e'/>
<id>urn:sha1:948bf85c1bc9a84754786a9d5dd99b7ecc46451e</id>
<content type='text'>
This patch builds upon the new NetLabel address selector functionality by
providing the NetLabel KAPI and CIPSO engine support needed to enable the
new packet-based labeling.  The only new addition to the NetLabel KAPI at
this point is shown below:

 * int netlbl_skbuff_setattr(skb, family, secattr)

... and is designed to be called from a Netfilter hook after the packet's
IP header has been populated such as in the FORWARD or LOCAL_OUT hooks.

This patch also provides the necessary SELinux hooks to support this new
functionality.  Smack support is not currently included due to uncertainty
regarding the permissions needed to expand the Smack network access controls.

Signed-off-by: Paul Moore &lt;paul.moore@hp.com&gt;
Reviewed-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
</feed>
