<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/key, branch v3.18</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-07-15T23:27:00Z</updated>
<entry>
<title>af_key: remove unnecessary break after return</title>
<updated>2014-07-15T23:27:00Z</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2014-07-14T16:30:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4ecf1dc7ad031ede37a0eac259b57eebfe375bfa'/>
<id>urn:sha1:4ecf1dc7ad031ede37a0eac259b57eebfe375bfa</id>
<content type='text'>
Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>af_key: Replace comma with semicolon</title>
<updated>2014-05-31T00:48:58Z</updated>
<author>
<name>Himangi Saraogi</name>
<email>himangi774@gmail.com</email>
</author>
<published>2014-05-30T15:48:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=47162c0b7e26ef29e1e7ab030c95e60dd07526dc'/>
<id>urn:sha1:47162c0b7e26ef29e1e7ab030c95e60dd07526dc</id>
<content type='text'>
This patch replaces a comma between expression statements by a semicolon.

A simplified version of the semantic patch that performs this
transformation is as follows:

// &lt;smpl&gt;
@r@
expression e1,e2,e;
type T;
identifier i;
@@

 e1
-,
+;
 e2;
// &lt;/smpl&gt;

Signed-off-by: Himangi Saraogi &lt;himangi774@gmail.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xfrm: Remove useless xfrm_audit struct.</title>
<updated>2014-04-23T06:21:04Z</updated>
<author>
<name>Tetsuo Handa</name>
<email>penguin-kernel@I-love.SAKURA.ne.jp</email>
</author>
<published>2014-04-22T12:48:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2e71029e2c32ecd59a2e8f351517bfbbad42ac11'/>
<id>urn:sha1:2e71029e2c32ecd59a2e8f351517bfbbad42ac11</id>
<content type='text'>
Commit f1370cc4 "xfrm: Remove useless secid field from xfrm_audit." changed
"struct xfrm_audit" to have either
{ audit_get_loginuid(current) / audit_get_sessionid(current) } or
{ INVALID_UID / -1 } pair.

This means that we can represent "struct xfrm_audit" as "bool".
This patch replaces "struct xfrm_audit" argument with "bool".

Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>xfrm: Remove useless secid field from xfrm_audit.</title>
<updated>2014-04-22T08:47:53Z</updated>
<author>
<name>Tetsuo Handa</name>
<email>penguin-kernel@I-love.SAKURA.ne.jp</email>
</author>
<published>2014-04-18T07:23:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f1370cc4a01e61007ab3020c761cef6b88ae3729'/>
<id>urn:sha1:f1370cc4a01e61007ab3020c761cef6b88ae3729</id>
<content type='text'>
It seems to me that commit ab5f5e8b "[XFRM]: xfrm audit calls" is doing
something strange at xfrm_audit_helper_usrinfo().
If secid != 0 &amp;&amp; security_secid_to_secctx(secid) != 0, the caller calls
audit_log_task_context() which basically does
secid != 0 &amp;&amp; security_secid_to_secctx(secid) == 0 case
except that secid is obtained from current thread's context.

Oh, what happens if secid passed to xfrm_audit_helper_usrinfo() was
obtained from other thread's context? It might audit current thread's
context rather than other thread's context if security_secid_to_secctx()
in xfrm_audit_helper_usrinfo() failed for some reason.

Then, are all the caller of xfrm_audit_helper_usrinfo() passing either
secid obtained from current thread's context or secid == 0?
It seems to me that they are.

If I didn't miss something, we don't need to pass secid to
xfrm_audit_helper_usrinfo() because audit_log_task_context() will
obtain secid from current thread's context.

Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>net: Fix use after free by removing length arg from sk_data_ready callbacks.</title>
<updated>2014-04-11T20:15:36Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2014-04-11T20:15:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=676d23690fb62b5d51ba5d659935e9f7d9da9f8e'/>
<id>urn:sha1:676d23690fb62b5d51ba5d659935e9f7d9da9f8e</id>
<content type='text'>
Several spots in the kernel perform a sequence like:

	skb_queue_tail(&amp;sk-&gt;s_receive_queue, skb);
	sk-&gt;sk_data_ready(sk, skb-&gt;len);

But at the moment we place the SKB onto the socket receive queue it
can be consumed and freed up.  So this skb-&gt;len access is potentially
to freed up memory.

Furthermore, the skb-&gt;len can be modified by the consumer so it is
possible that the value isn't accurate.

And finally, no actual implementation of this callback actually uses
the length argument.  And since nobody actually cared about it's
value, lots of call sites pass arbitrary values in such as '0' and
even '1'.

So just remove the length argument from the callback, that way there
is no confusion whatsoever and all of these use-after-free cases get
fixed as a side effect.

Based upon a patch by Eric Dumazet and his suggestion to audit this
issue tree-wide.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2014-03-26T00:29:20Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2014-03-26T00:29:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04f58c88542b6b351efb4eea01134eb672e22e6e'/>
<id>urn:sha1:04f58c88542b6b351efb4eea01134eb672e22e6e</id>
<content type='text'>
Conflicts:
	Documentation/devicetree/bindings/net/micrel-ks8851.txt
	net/core/netpoll.c

The net/core/netpoll.c conflict is a bug fix in 'net' happening
to code which is completely removed in 'net-next'.

In micrel-ks8851.txt we simply have overlapping changes.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selinux: add gfp argument to security_xfrm_policy_alloc and fix callers</title>
<updated>2014-03-10T07:30:02Z</updated>
<author>
<name>Nikolay Aleksandrov</name>
<email>nikolay@redhat.com</email>
</author>
<published>2014-03-07T11:44:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=52a4c6404f91f2d2c5592ee6365a8418c4565f53'/>
<id>urn:sha1:52a4c6404f91f2d2c5592ee6365a8418c4565f53</id>
<content type='text'>
security_xfrm_policy_alloc can be called in atomic context so the
allocation should be done with GFP_ATOMIC. Add an argument to let the
callers choose the appropriate way. In order to do so a gfp argument
needs to be added to the method xfrm_policy_alloc_security in struct
security_operations and to the internal function
selinux_xfrm_alloc_user. After that switch to GFP_ATOMIC in the atomic
callers and leave GFP_KERNEL as before for the rest.
The path that needed the gfp argument addition is:
security_xfrm_policy_alloc -&gt; security_ops.xfrm_policy_alloc_security -&gt;
all users of xfrm_policy_alloc_security (e.g. selinux_xfrm_policy_alloc) -&gt;
selinux_xfrm_alloc_user (here the allocation used to be GFP_KERNEL only)

Now adding a gfp argument to selinux_xfrm_alloc_user requires us to also
add it to security_context_to_sid which is used inside and prior to this
patch did only GFP_KERNEL allocation. So add gfp argument to
security_context_to_sid and adjust all of its callers as well.

CC: Paul Moore &lt;paul@paul-moore.com&gt;
CC: Dave Jones &lt;davej@redhat.com&gt;
CC: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
CC: Fan Du &lt;fan.du@windriver.com&gt;
CC: David S. Miller &lt;davem@davemloft.net&gt;
CC: LSM list &lt;linux-security-module@vger.kernel.org&gt;
CC: SELinux list &lt;selinux@tycho.nsa.gov&gt;

Signed-off-by: Nikolay Aleksandrov &lt;nikolay@redhat.com&gt;
Acked-by: Paul Moore &lt;paul@paul-moore.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>net: af_key: fix sleeping under rcu</title>
<updated>2014-03-10T07:27:22Z</updated>
<author>
<name>Nikolay Aleksandrov</name>
<email>nikolay@redhat.com</email>
</author>
<published>2014-03-07T11:44:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=87536a81e1f52409b45333ce8cac415a1218163c'/>
<id>urn:sha1:87536a81e1f52409b45333ce8cac415a1218163c</id>
<content type='text'>
There's a kmalloc with GFP_KERNEL in a helper
(pfkey_sadb2xfrm_user_sec_ctx) used in pfkey_compile_policy which is
called under rcu_read_lock. Adjust pfkey_sadb2xfrm_user_sec_ctx to have
a gfp argument and adjust the users.

CC: Dave Jones &lt;davej@redhat.com&gt;
CC: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
CC: Fan Du &lt;fan.du@windriver.com&gt;
CC: David S. Miller &lt;davem@davemloft.net&gt;

Signed-off-by: Nikolay Aleksandrov &lt;nikolay@redhat.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>xfrm: rename struct xfrm_filter</title>
<updated>2014-03-07T07:12:37Z</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2014-03-06T17:24:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=870a2df4ca026817eb87bb2f9daaa60a93fd051a'/>
<id>urn:sha1:870a2df4ca026817eb87bb2f9daaa60a93fd051a</id>
<content type='text'>
iproute2 already defines a structure with that name, let's use another one to
avoid any conflict.

CC: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>pfkey: fix SADB_X_EXT_FILTER length check</title>
<updated>2014-02-21T05:40:54Z</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2014-02-20T13:52:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d2c5f6582515362328b33b2a331a17e141ef0d40'/>
<id>urn:sha1:d2c5f6582515362328b33b2a331a17e141ef0d40</id>
<content type='text'>
This patch fixes commit d3623099d350 ("ipsec: add support of limited SA dump").

sadb_ext_min_len array should be updated with the new type (SADB_X_EXT_FILTER).

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
</feed>
