<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sctp/auth.c, branch linux-2.6.27.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.27.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.27.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-04-30T14:53:02Z</updated>
<entry>
<title>sctp: Fix out-of-bounds reading in sctp_asoc_get_hmac()</title>
<updated>2011-04-30T14:53:02Z</updated>
<author>
<name>Dan Rosenberg</name>
</author>
<published>2010-10-01T11:51:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aadbd20969785c1d15a84d151fed0aa2a8873732'/>
<id>urn:sha1:aadbd20969785c1d15a84d151fed0aa2a8873732</id>
<content type='text'>
commit 51e97a12bef19b7e43199fc153cf9bd5f2140362 upstream.

The sctp_asoc_get_hmac() function iterates through a peer's hmac_ids
array and attempts to ensure that only a supported hmac entry is
returned.  The current code fails to do this properly - if the last id
in the array is out of range (greater than SCTP_AUTH_HMAC_ID_MAX), the
id integer remains set after exiting the loop, and the address of an
out-of-bounds entry will be returned and subsequently used in the parent
function, causing potentially ugly memory corruption.  This patch resets
the id integer to 0 on encountering an invalid id so that NULL will be
returned after finishing the loop if no valid ids are found.

Signed-off-by: Dan Rosenberg &lt;drosenberg@vsecurity.com&gt;
Acked-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>sctp: fix random memory dereference with SCTP_HMAC_IDENT option.</title>
<updated>2008-08-27T23:09:49Z</updated>
<author>
<name>Vlad Yasevich</name>
</author>
<published>2008-08-27T23:09:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d97240552cd98c4b07322f30f66fd9c3ba4171de'/>
<id>urn:sha1:d97240552cd98c4b07322f30f66fd9c3ba4171de</id>
<content type='text'>
The number of identifiers needs to be checked against the option
length.  Also, the identifier index provided needs to be verified
to make sure that it doesn't exceed the bounds of the array.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: add verification checks to SCTP_AUTH_KEY option</title>
<updated>2008-08-25T22:16:19Z</updated>
<author>
<name>Vlad Yasevich</name>
</author>
<published>2008-08-25T22:16:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=30c2235cbc477d4629983d440cdc4f496fec9246'/>
<id>urn:sha1:30c2235cbc477d4629983d440cdc4f496fec9246</id>
<content type='text'>
The structure used for SCTP_AUTH_KEY option contains a
length that needs to be verfied to prevent buffer overflow
conditions.  Spoted by Eugene Teo &lt;eteo@redhat.com&gt;.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[SCTP]: Update AUTH structures to match declarations in draft-16.</title>
<updated>2008-02-28T21:45:04Z</updated>
<author>
<name>Vlad Yasevich</name>
</author>
<published>2008-02-27T21:04:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7e8616d8e7731b026019d9af7cc9914b8bb42bc7'/>
<id>urn:sha1:7e8616d8e7731b026019d9af7cc9914b8bb42bc7</id>
<content type='text'>
The new SCTP socket api (draft 16) updates the AUTH API structures.
We never exported these since we knew they would change.
Update the rest to match the draft.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
</content>
</entry>
<entry>
<title>[SCTP]: Stop claiming that this is a "reference implementation"</title>
<updated>2008-02-05T15:59:07Z</updated>
<author>
<name>Vlad Yasevich</name>
</author>
<published>2008-01-11T14:57:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=60c778b25972e095df8981dd41e99d161e8738f9'/>
<id>urn:sha1:60c778b25972e095df8981dd41e99d161e8738f9</id>
<content type='text'>
I was notified by Randy Stewart that lksctp claims to be
"the reference implementation".  First of all, "the
refrence implementation" was the original implementation
of SCTP in usersapce written ty Randy and a few others.
Second, after looking at the definiton of 'reference implementation',
we don't really meet the requirements.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
</content>
</entry>
<entry>
<title>[SCTP]: Fix kernel panic while received AUTH chunk with BAD shared key identifier</title>
<updated>2008-02-05T11:03:06Z</updated>
<author>
<name>Wei Yongjun</name>
</author>
<published>2008-02-05T11:03:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7cc08b55fc476a9474e4dc9da41071b5dc2b406e'/>
<id>urn:sha1:7cc08b55fc476a9474e4dc9da41071b5dc2b406e</id>
<content type='text'>
If SCTP-AUTH is enabled, received AUTH chunk with BAD shared key 
identifier will cause kernel panic.

Test as following:
step1: enabled /proc/sys/net/sctp/auth_enable
step 2:  connect  to SCTP server with auth capable. Association is 
established between endpoints. Then send a AUTH chunk with a bad 
shareid, SCTP server will kernel panic after received that AUTH chunk.

SCTP client                   SCTP server
  INIT         ----------&gt;  
    (with auth capable)
               &lt;----------    INIT-ACK
                              (with auth capable)
  COOKIE-ECHO  ----------&gt;
               &lt;----------    COOKIE-ACK
  AUTH         ----------&gt;


AUTH chunk is like this:
  AUTH chunk
    Chunk type: AUTH (15)
    Chunk flags: 0x00
    Chunk length: 28
    Shared key identifier: 10
    HMAC identifier: SHA-1 (1)
    HMAC: 0000000000000000000000000000000000000000

The assignment of NULL to key can safely be removed, since key_for_each 
(which is just list_for_each_entry under the covers does an initial 
assignment to key anyway).

If the endpoint_shared_keys list is empty, or if the key_id being 
requested does not exist, the function as it currently stands returns 
the actuall list_head (in this case endpoint_shared_keys.  Since that 
list_head isn't surrounded by an actuall data structure, the last 
iteration through list_for_each_entry will do a container_of on key, and 
we wind up returning a bogus pointer, instead of NULL, as we should.

&gt; Neil Horman wrote:
&gt;&gt; On Tue, Jan 22, 2008 at 05:29:20PM +0900, Wei Yongjun wrote:
&gt;&gt;
&gt;&gt; FWIW, Ack from me.  The assignment of NULL to key can safely be 
&gt;&gt; removed, since
&gt;&gt; key_for_each (which is just list_for_each_entry under the covers does 
&gt;&gt; an initial
&gt;&gt; assignment to key anyway).
&gt;&gt; If the endpoint_shared_keys list is empty, or if the key_id being 
&gt;&gt; requested does
&gt;&gt; not exist, the function as it currently stands returns the actuall 
&gt;&gt; list_head (in
&gt;&gt; this case endpoint_shared_keys.  Since that list_head isn't 
&gt;&gt; surrounded by an
&gt;&gt; actuall data structure, the last iteration through 
&gt;&gt; list_for_each_entry will do a
&gt;&gt; container_of on key, and we wind up returning a bogus pointer, 
&gt;&gt; instead of NULL,
&gt;&gt; as we should.  Wei's patch corrects that.
&gt;&gt;
&gt;&gt; Regards
&gt;&gt; Neil
&gt;&gt;
&gt;&gt; Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
&gt;&gt;
&gt;
&gt; Yep, the patch is correct.
&gt;
&gt; Acked-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
&gt;
&gt; -vlad
&gt;

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>SCTP: Fix build issues with SCTP AUTH.</title>
<updated>2007-11-29T15:17:42Z</updated>
<author>
<name>Vlad Yasevich</name>
</author>
<published>2007-11-29T14:53:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b7e0fe9f81e19c4f2a1369b324c3c062c1738be4'/>
<id>urn:sha1:b7e0fe9f81e19c4f2a1369b324c3c062c1738be4</id>
<content type='text'>
SCTP-AUTH requires selection of CRYPTO, HMAC and SHA1 since
SHA1 is a MUST requirement for AUTH.  We also support SHA256,
but that's optional, so fix the code to treat it as such.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
</content>
</entry>
<entry>
<title>SCTP: Fix chunk acceptance when no authenticated chunks were listed.</title>
<updated>2007-11-29T15:17:42Z</updated>
<author>
<name>Vlad Yasevich</name>
</author>
<published>2007-11-29T13:56:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=555d3d5d2be13675490a80df0d7961551822ef1f'/>
<id>urn:sha1:555d3d5d2be13675490a80df0d7961551822ef1f</id>
<content type='text'>
In the case where no autheticated chunks were specified, we were still
trying to verify that a given chunk needs authentication and doing so
incorrectly.  Add a check for parameter length to make sure we don't
try to use an empty auth_chunks parameter to verify against.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
</content>
</entry>
<entry>
<title>SCTP endianness annotations regression</title>
<updated>2007-10-29T14:41:32Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2007-10-29T05:03:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d06f608265d5fc41aefe2fae5b62da4893ecae35'/>
<id>urn:sha1:d06f608265d5fc41aefe2fae5b62da4893ecae35</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[CRYPTO] users: Fix up scatterlist conversion errors</title>
<updated>2007-10-27T07:52:07Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2007-10-27T07:52:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68e3f5dd4db62619fdbe520d36c9ebf62e672256'/>
<id>urn:sha1:68e3f5dd4db62619fdbe520d36c9ebf62e672256</id>
<content type='text'>
This patch fixes the errors made in the users of the crypto layer during
the sg_init_table conversion.  It also adds a few conversions that were
missing altogether.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
