<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/key, branch v2.6.23</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>[PF_KEY]: Fix ipsec not working in 2.6.23-rc1-git10</title>
<updated>2007-08-03T02:42:29+00:00</updated>
<author>
<name>Joy Latten</name>
<email>latten@austin.ibm.com</email>
</author>
<published>2007-08-03T02:25:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4a4b6271a8df417e328aed4c8a7e04e0b282207e'/>
<id>4a4b6271a8df417e328aed4c8a7e04e0b282207e</id>
<content type='text'>
Although an ipsec SA was established, kernel couldn't seem to find it.

I think since we are now using "x-&gt;sel.family" instead of "family" in
the xfrm_selector_match() called in xfrm_state_find(), af_key needs to
set this field too, just as xfrm_user.

In af_key.c, x-&gt;sel.family only gets set when there's an
ext_hdrs[SADB_EXT_ADDRESS_PROXY-1] which I think is for tunnel.

I think pfkey needs to also set the x-&gt;sel.family field when it is 0.

Tested with below patch, and ipsec worked when using pfkey.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Although an ipsec SA was established, kernel couldn't seem to find it.

I think since we are now using "x-&gt;sel.family" instead of "family" in
the xfrm_selector_match() called in xfrm_state_find(), af_key needs to
set this field too, just as xfrm_user.

In af_key.c, x-&gt;sel.family only gets set when there's an
ext_hdrs[SADB_EXT_ADDRESS_PROXY-1] which I think is for tunnel.

I think pfkey needs to also set the x-&gt;sel.family field when it is 0.

Tested with below patch, and ipsec worked when using pfkey.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/* misc endianness annotations</title>
<updated>2007-07-26T18:11:56+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2007-07-26T16:33:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=582ee43dad8e411513a74f2d801255dcffc6d29e'/>
<id>582ee43dad8e411513a74f2d801255dcffc6d29e</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xfrm: Add security check before flushing SAD/SPD</title>
<updated>2007-06-07T20:42:46+00:00</updated>
<author>
<name>Joy Latten</name>
<email>latten@austin.ibm.com</email>
</author>
<published>2007-06-04T23:05:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4aa2e62c45b5ca08be2d0d3c0744d7585b56e860'/>
<id>4aa2e62c45b5ca08be2d0d3c0744d7585b56e860</id>
<content type='text'>
Currently we check for permission before deleting entries from SAD and
SPD, (see security_xfrm_policy_delete() security_xfrm_state_delete())
However we are not checking for authorization when flushing the SPD and
the SAD completely. It was perhaps missed in the original security hooks
patch.

This patch adds a security check when flushing entries from the SAD and
SPD.  It runs the entire database and checks each entry for a denial.
If the process attempting the flush is unable to remove all of the
entries a denial is logged the the flush function returns an error
without removing anything.

This is particularly useful when a process may need to create or delete
its own xfrm entries used for things like labeled networking but that
same process should not be able to delete other entries or flush the
entire database.

Signed-off-by: Joy Latten&lt;latten@austin.ibm.com&gt;
Signed-off-by: Eric Paris &lt;eparis@parisplace.org&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently we check for permission before deleting entries from SAD and
SPD, (see security_xfrm_policy_delete() security_xfrm_state_delete())
However we are not checking for authorization when flushing the SPD and
the SAD completely. It was perhaps missed in the original security hooks
patch.

This patch adds a security check when flushing entries from the SAD and
SPD.  It runs the entire database and checks each entry for a denial.
If the process attempting the flush is unable to remove all of the
entries a denial is logged the the flush function returns an error
without removing anything.

This is particularly useful when a process may need to create or delete
its own xfrm entries used for things like labeled networking but that
same process should not be able to delete other entries or flush the
entire database.

Signed-off-by: Joy Latten&lt;latten@austin.ibm.com&gt;
Signed-off-by: Eric Paris &lt;eparis@parisplace.org&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IPSEC] pfkey: Load specific algorithm in pfkey_add rather than all</title>
<updated>2007-05-19T21:21:18+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2007-05-19T21:21:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c92b3a2f1f11655ecf6774b745017a414241d07c'/>
<id>c92b3a2f1f11655ecf6774b745017a414241d07c</id>
<content type='text'>
This is a natural extension of the changeset

    [XFRM]: Probe selected algorithm only.

which only removed the probe call for xfrm_user.  This patch does exactly
the same thing for af_key.  In other words, we load the algorithm requested
by the user rather than everything when adding xfrm states in af_key.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a natural extension of the changeset

    [XFRM]: Probe selected algorithm only.

which only removed the probe call for xfrm_user.  This patch does exactly
the same thing for af_key.  In other words, we load the algorithm requested
by the user rather than everything when adding xfrm states in af_key.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[NET]: cleanup extra semicolons</title>
<updated>2007-04-26T05:29:24+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@linux-foundation.org</email>
</author>
<published>2007-04-21T00:09:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3ff50b7997fe06cd5d276b229967bb52d6b3b6c1'/>
<id>3ff50b7997fe06cd5d276b229967bb52d6b3b6c1</id>
<content type='text'>
Spring cleaning time...

There seems to be a lot of places in the network code that have
extra bogus semicolons after conditionals.  Most commonly is a
bogus semicolon after: switch() { }

Signed-off-by: Stephen Hemminger &lt;shemminger@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Spring cleaning time...

There seems to be a lot of places in the network code that have
extra bogus semicolons after conditionals.  Most commonly is a
bogus semicolon after: switch() { }

Signed-off-by: Stephen Hemminger &lt;shemminger@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SK_BUFF]: Introduce skb_reset_transport_header(skb)</title>
<updated>2007-04-26T05:25:15+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2007-03-13T16:06:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=badff6d01a8589a1c828b0bf118903ca38627f4e'/>
<id>badff6d01a8589a1c828b0bf118903ca38627f4e</id>
<content type='text'>
For the common, open coded 'skb-&gt;h.raw = skb-&gt;data' operation, so that we can
later turn skb-&gt;h.raw into a offset, reducing the size of struct sk_buff in
64bit land while possibly keeping it as a pointer on 32bit.

This one touches just the most simple cases:

skb-&gt;h.raw = skb-&gt;data;
skb-&gt;h.raw = {skb_push|[__]skb_pull}()

The next ones will handle the slightly more "complex" cases.

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For the common, open coded 'skb-&gt;h.raw = skb-&gt;data' operation, so that we can
later turn skb-&gt;h.raw into a offset, reducing the size of struct sk_buff in
64bit land while possibly keeping it as a pointer on 32bit.

This one touches just the most simple cases:

skb-&gt;h.raw = skb-&gt;data;
skb-&gt;h.raw = {skb_push|[__]skb_pull}()

The next ones will handle the slightly more "complex" cases.

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IPSEC] af_key: Fix thinko in pfkey_xfrm_policy2msg()</title>
<updated>2007-04-18T21:16:07+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@sunset.davemloft.net</email>
</author>
<published>2007-04-18T04:48:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fefaa75e0451c76225863644be01e4fd70884153'/>
<id>fefaa75e0451c76225863644be01e4fd70884153</id>
<content type='text'>
Make sure to actually assign the determined mode to
rq-&gt;sadb_x_ipsecrequest_mode.

Noticed by Joe Perches.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure to actually assign the determined mode to
rq-&gt;sadb_x_ipsecrequest_mode.

Noticed by Joe Perches.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[KEY]: Fix conversion between IPSEC_MODE_xxx and XFRM_MODE_xxx.</title>
<updated>2007-04-17T20:13:21+00:00</updated>
<author>
<name>Kazunori MIYAZAWA</name>
<email>miyazawa@linux-ipv6.org</email>
</author>
<published>2007-04-17T19:32:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=55569ce256ce29f4624f0007213432c1ed646584'/>
<id>55569ce256ce29f4624f0007213432c1ed646584</id>
<content type='text'>
We should not blindly convert between IPSEC_MODE_xxx and XFRM_MODE_xxx just
by incrementing / decrementing because the assumption is not true any longer.

Signed-off-by: Kazunori MIYAZAWA &lt;miyazawa@linux-ipv6.org&gt;
Singed-off-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should not blindly convert between IPSEC_MODE_xxx and XFRM_MODE_xxx just
by incrementing / decrementing because the assumption is not true any longer.

Signed-off-by: Kazunori MIYAZAWA &lt;miyazawa@linux-ipv6.org&gt;
Singed-off-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IPSEC]: xfrm audit hook misplaced in pfkey_delete and xfrm_del_sa</title>
<updated>2007-03-08T00:08:11+00:00</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2007-03-08T00:02:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=16bec31db751030171b31d7767fa3a5bdbe980ea'/>
<id>16bec31db751030171b31d7767fa3a5bdbe980ea</id>
<content type='text'>
Inside pfkey_delete and xfrm_del_sa the audit hooks were not called if
there was any permission/security failures in attempting to do the del
operation (such as permission denied from security_xfrm_state_delete).
This patch moves the audit hook to the exit path such that all failures
(and successes) will actually get audited.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Acked-by: Venkat Yekkirala &lt;vyekkirala@trustedcs.com&gt;
Acked-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Inside pfkey_delete and xfrm_del_sa the audit hooks were not called if
there was any permission/security failures in attempting to do the del
operation (such as permission denied from security_xfrm_state_delete).
This patch moves the audit hook to the exit path such that all failures
(and successes) will actually get audited.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Acked-by: Venkat Yekkirala &lt;vyekkirala@trustedcs.com&gt;
Acked-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IPSEC]: Add xfrm policy change auditing to pfkey_spdget</title>
<updated>2007-03-08T00:08:10+00:00</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2007-03-08T00:01:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=215a2dd3b43e0dc425e81d21de9d961416b1dad4'/>
<id>215a2dd3b43e0dc425e81d21de9d961416b1dad4</id>
<content type='text'>
pfkey_spdget neither had an LSM security hook nor auditing for the
removal of xfrm_policy structs.  The security hook was added when it was
moved into xfrm_policy_byid instead of the callers to that function by
my earlier patch and this patch adds the auditing hooks as well.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Acked-by: Venkat Yekkirala &lt;vyekkirala@trustedcs.com&gt;
Acked-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pfkey_spdget neither had an LSM security hook nor auditing for the
removal of xfrm_policy structs.  The security hook was added when it was
moved into xfrm_policy_byid instead of the callers to that function by
my earlier patch and this patch adds the auditing hooks as well.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Acked-by: Venkat Yekkirala &lt;vyekkirala@trustedcs.com&gt;
Acked-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
