<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sctp, branch linux-3.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-03-28T19:17:08Z</updated>
<entry>
<title>sctp: don't break the loop while meeting the active_path so as to find the matched transport</title>
<updated>2013-03-28T19:17:08Z</updated>
<author>
<name>Xufeng Zhang</name>
</author>
<published>2013-03-07T21:39:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ca0bf9a6b970d312aa38718ab4619649134a13d'/>
<id>urn:sha1:0ca0bf9a6b970d312aa38718ab4619649134a13d</id>
<content type='text'>
[ Upstream commit 2317f449af30073cfa6ec8352e4a65a89e357bdd ]

sctp_assoc_lookup_tsn() function searchs which transport a certain TSN
was sent on, if not found in the active_path transport, then go search
all the other transports in the peer's transport_addr_list, however, we
should continue to the next entry rather than break the loop when meet
the active_path transport.

Signed-off-by: Xufeng Zhang &lt;xufeng.zhang@windriver.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sctp: Use correct sideffect command in duplicate cookie handling</title>
<updated>2013-03-28T19:17:08Z</updated>
<author>
<name>Vlad Yasevich</name>
</author>
<published>2013-03-12T15:53:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=37cd2294d40ef81320715b9e1606ac1f43d99c3a'/>
<id>urn:sha1:37cd2294d40ef81320715b9e1606ac1f43d99c3a</id>
<content type='text'>
[ Upstream commit f2815633504b442ca0b0605c16bf3d88a3a0fcea ]

When SCTP is done processing a duplicate cookie chunk, it tries
to delete a newly created association.  For that, it has to set
the right association for the side-effect processing to work.
However, when it uses the SCTP_CMD_NEW_ASOC command, that performs
more work then really needed (like hashing the associationa and
assigning it an id) and there is no point to do that only to
delete the association as a next step.  In fact, it also creates
an impossible condition where an association may be found by
the getsockopt() call, and that association is empty.  This
causes a crash in some sctp getsockopts.

The solution is rather simple.  We simply use SCTP_CMD_SET_ASOC
command that doesn't have all the overhead and does exactly
what we need.

Reported-by: Karl Heiss &lt;kheiss@gmail.com&gt;
Tested-by: Karl Heiss &lt;kheiss@gmail.com&gt;
CC: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net/sctp: Validate parameter size for SCTP_GET_ASSOC_STATS</title>
<updated>2013-03-20T20:10:57Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2013-02-27T10:57:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=10ad3eeffe25354f9ef7d7e530c60216f2f2e641'/>
<id>urn:sha1:10ad3eeffe25354f9ef7d7e530c60216f2f2e641</id>
<content type='text'>
commit 726bc6b092da4c093eb74d13c07184b18c1af0f1 upstream.

Building sctp may fail with:

In function ‘copy_from_user’,
    inlined from ‘sctp_getsockopt_assoc_stats’ at
    net/sctp/socket.c:5656:20:
arch/x86/include/asm/uaccess_32.h:211:26: error: call to
    ‘copy_from_user_overflow’ declared with attribute error: copy_from_user()
    buffer size is not provably correct

if built with W=1 due to a missing parameter size validation
before the call to copy_from_user.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net, sctp: remove CONFIG_EXPERIMENTAL</title>
<updated>2013-02-13T18:57:27Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2013-02-13T00:24:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3bdb1a443a53a4058b95c8a67c856cc8b8393411'/>
<id>urn:sha1:3bdb1a443a53a4058b95c8a67c856cc8b8393411</id>
<content type='text'>
This config item has not carried much meaning for a while now and is
almost always enabled by default. As agreed during the Linux kernel
summit, remove it.

Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Acked-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: David Rientjes &lt;rientjes@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sctp: sctp_v6_get_dst: fix boolean test in dst cache</title>
<updated>2013-02-13T18:42:34Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2013-02-12T13:30:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e9c0dfbaa28b7c9f5d3482633770cdeec53e3f7b'/>
<id>urn:sha1:e9c0dfbaa28b7c9f5d3482633770cdeec53e3f7b</id>
<content type='text'>
We walk through the bind address list and try to get the best source
address for a given destination. However, currently, we take the
'continue' path of the loop when an entry is invalid (!laddr-&gt;valid)
*and* the entry state does not equal SCTP_ADDR_SRC (laddr-&gt;state !=
SCTP_ADDR_SRC).

Thus, still, invalid entries with SCTP_ADDR_SRC might not 'continue'
as well as valid entries with SCTP_ADDR_{NEW, SRC, DEL}, with a possible
false baddr and matchlen as a result, causing in worst case dst route
to be false or possibly NULL.

This test should actually be a '||' instead of '&amp;&amp;'. But lets fix it
and make this a bit easier to read by having the condition the same way
as similarly done in sctp_v4_get_dst.

Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sctp: sctp_endpoint_free: zero out secret key data</title>
<updated>2013-02-08T19:54:24Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2013-02-08T03:04:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b5c37fe6e24eec194bb29d22fdd55d73bcc709bf'/>
<id>urn:sha1:b5c37fe6e24eec194bb29d22fdd55d73bcc709bf</id>
<content type='text'>
On sctp_endpoint_destroy, previously used sensitive keying material
should be zeroed out before the memory is returned, as we already do
with e.g. auth keys when released.

Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sctp: sctp_setsockopt_auth_key: use kzfree instead of kfree</title>
<updated>2013-02-08T19:54:24Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2013-02-08T03:04:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ba542a291a5e558603ac51cda9bded347ce7627'/>
<id>urn:sha1:6ba542a291a5e558603ac51cda9bded347ce7627</id>
<content type='text'>
In sctp_setsockopt_auth_key, we create a temporary copy of the user
passed shared auth key for the endpoint or association and after
internal setup, we free it right away. Since it's sensitive data, we
should zero out the key before returning the memory back to the
allocator. Thus, use kzfree instead of kfree, just as we do in
sctp_auth_key_put().

Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sctp: sctp_auth_key_put: use kzfree instead of kfree</title>
<updated>2013-02-08T04:43:42Z</updated>
<author>
<name>Daniel Borkmann</name>
</author>
<published>2013-02-07T00:55:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=586c31f3bf04c290dc0a0de7fc91d20aa9a5ee53'/>
<id>urn:sha1:586c31f3bf04c290dc0a0de7fc91d20aa9a5ee53</id>
<content type='text'>
For sensitive data like keying material, it is common practice to zero
out keys before returning the memory back to the allocator. Thus, use
kzfree instead of kfree.

Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>SCTP: Free the per-net sysctl table on net exit. v2</title>
<updated>2013-01-28T05:09:32Z</updated>
<author>
<name>Vlad Yasevich</name>
</author>
<published>2013-01-24T16:02:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f19d1219a5b96c7b00ad5c3f889030093a8d1a3'/>
<id>urn:sha1:5f19d1219a5b96c7b00ad5c3f889030093a8d1a3</id>
<content type='text'>
Per-net sysctl table needs to be explicitly freed at
net exit.  Otherwise we see the following with kmemleak:

unreferenced object 0xffff880402d08000 (size 2048):
  comm "chrome_sandbox", pid 18437, jiffies 4310887172 (age 9097.630s)
  hex dump (first 32 bytes):
    b2 68 89 81 ff ff ff ff 20 04 04 f8 01 88 ff ff  .h...... .......
    04 00 00 00 a4 01 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffffffff815b4aad&gt;] kmemleak_alloc+0x21/0x3e
    [&lt;ffffffff81110352&gt;] slab_post_alloc_hook+0x28/0x2a
    [&lt;ffffffff81113fad&gt;] __kmalloc_track_caller+0xf1/0x104
    [&lt;ffffffff810f10c2&gt;] kmemdup+0x1b/0x30
    [&lt;ffffffff81571e9f&gt;] sctp_sysctl_net_register+0x1f/0x72
    [&lt;ffffffff8155d305&gt;] sctp_net_init+0x100/0x39f
    [&lt;ffffffff814ad53c&gt;] ops_init+0xc6/0xf5
    [&lt;ffffffff814ad5b7&gt;] setup_net+0x4c/0xd0
    [&lt;ffffffff814ada5e&gt;] copy_net_ns+0x6d/0xd6
    [&lt;ffffffff810938b1&gt;] create_new_namespaces+0xd7/0x147
    [&lt;ffffffff810939f4&gt;] copy_namespaces+0x63/0x99
    [&lt;ffffffff81076733&gt;] copy_process+0xa65/0x1233
    [&lt;ffffffff81077030&gt;] do_fork+0x10b/0x271
    [&lt;ffffffff8100a0e9&gt;] sys_clone+0x23/0x25
    [&lt;ffffffff815dda73&gt;] stub_clone+0x13/0x20
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

I fixed the spelling of sysctl_header so the code actually
compiles. -- EWB.

Reported-by: Martin Mokrejs &lt;mmokrejs@fold.natur.cuni.cz&gt;
Signed-off-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: set association state to established in dupcook_a handler</title>
<updated>2013-01-28T00:32:23Z</updated>
<author>
<name>Xufeng Zhang</name>
</author>
<published>2013-01-23T16:44:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9839ff0dead906e85e4d17490aeff87a5859a157'/>
<id>urn:sha1:9839ff0dead906e85e4d17490aeff87a5859a157</id>
<content type='text'>
While sctp handling a duplicate COOKIE-ECHO and the action is
'Association restart', sctp_sf_do_dupcook_a() will processing
the unexpected COOKIE-ECHO for peer restart, but it does not set
the association state to SCTP_STATE_ESTABLISHED, so the association
could stuck in SCTP_STATE_SHUTDOWN_PENDING state forever.
This violates the sctp specification:
  RFC 4960 5.2.4. Handle a COOKIE ECHO when a TCB Exists
  Action
  A) In this case, the peer may have restarted. .....
     After this, the endpoint shall enter the ESTABLISHED state.

To resolve this problem, adding a SCTP_CMD_NEW_STATE cmd to the
command list before SCTP_CMD_REPLY cmd, this will set the restart
association to SCTP_STATE_ESTABLISHED state properly and also avoid
I-bit being set in the DATA chunk header when COOKIE_ACK is bundled
with DATA chunks.

Signed-off-by: Xufeng Zhang &lt;xufeng.zhang@windriver.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
