<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/ax25, 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:40Z</updated>
<entry>
<title>net: ax25: fix information leak to userland harder</title>
<updated>2011-04-30T14:53:40Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2011-01-12T08:34:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c7e4c4f58501ac1adc9ddcabda04be7849a60ff'/>
<id>urn:sha1:2c7e4c4f58501ac1adc9ddcabda04be7849a60ff</id>
<content type='text'>
commit 5b919f833d9d60588d026ad82d17f17e8872c7a9 upstream.

Commit fe10ae53384e48c51996941b7720ee16995cbcb7 adds a memset() to clear
the structure being sent back to userspace, but accidentally used the
wrong size.

Reported-by: Brad Spengler &lt;spender@grsecurity.net&gt;
Signed-off-by: Kees Cook &lt;kees.cook@canonical.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>net: ax25: fix information leak to userland</title>
<updated>2011-04-30T14:53:33Z</updated>
<author>
<name>Vasiliy Kulikov</name>
</author>
<published>2010-11-10T18:14:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fa0b3c99f7ce9972476a5fd99d0afbf9c9e46aff'/>
<id>urn:sha1:fa0b3c99f7ce9972476a5fd99d0afbf9c9e46aff</id>
<content type='text'>
commit fe10ae53384e48c51996941b7720ee16995cbcb7 upstream.

Sometimes ax25_getname() doesn't initialize all members of fsa_digipeater
field of fsa struct, also the struct has padding bytes between
sax25_call and sax25_ndigis fields.  This structure is then copied to
userland.  It leads to leaking of contents of kernel stack memory.

Signed-off-by: Vasiliy Kulikov &lt;segooon@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Moritz Muehlenhoff &lt;jmm@debian.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ax25: Fix possible oops in ax25_make_new</title>
<updated>2010-04-01T22:52:18Z</updated>
<author>
<name>Jarek Poplawski</name>
</author>
<published>2009-09-27T10:57:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d59e55cb2c8bc73f885de7242223849b3d051cd5'/>
<id>urn:sha1:d59e55cb2c8bc73f885de7242223849b3d051cd5</id>
<content type='text'>
commit 8c185ab6185bf5e67766edb000ce428269364c86 upstream.

In ax25_make_new, if kmemdup of digipeat returns an error, there would
be an oops in sk_free while calling sk_destruct, because sk_protinfo
is NULL at the moment; move sk-&gt;sk_destruct initialization after this.

BTW of reported-by: Bernard Pidoux F6BVP &lt;f6bvp@free.fr&gt;

Signed-off-by: Jarek Poplawski &lt;jarkao2@gmail.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>net ax25: Fix signed comparison in the sockopt handler</title>
<updated>2009-10-05T15:11:46Z</updated>
<author>
<name>Arjan van de Ven</name>
</author>
<published>2009-09-30T11:51:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc7fec29e1f24be79190e25aef1583c92111b052'/>
<id>urn:sha1:dc7fec29e1f24be79190e25aef1583c92111b052</id>
<content type='text'>
fixed upstream in commit b7058842c940ad2c08dd829b21e5c92ebe3b8758 in a different way

The ax25 code tried to use

        if (optlen &lt; sizeof(int))
                return -EINVAL;

as a security check against optlen being negative (or zero) in the
set socket option.

Unfortunately, "sizeof(int)" is an unsigned property, with the
result that the whole comparison is done in unsigned, letting
negative values slip through.

This patch changes this to

        if (optlen &lt; (int)sizeof(int))
                return -EINVAL;

so that the comparison is done as signed, and negative values
get properly caught.

Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>ax25: Quick fix for making sure unaccepted sockets get destroyed.</title>
<updated>2008-10-06T19:53:50Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2008-10-06T19:53:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33d1d2c52c3befa6c4df33b4ba58137d1c48894b'/>
<id>urn:sha1:33d1d2c52c3befa6c4df33b4ba58137d1c48894b</id>
<content type='text'>
Since we reverted 30902dc3cb0ea1cfc7ac2b17bcf478ff98420d74 ("ax25: Fix
std timer socket destroy handling.") we have to put some kind of fix
in to cure the issue whereby unaccepted connections do not get destroyed.

The approach used here is from Tihomir Heidelberg - 9a4gl

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Revert "ax25: Fix std timer socket destroy handling."</title>
<updated>2008-10-06T19:48:29Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2008-10-06T19:48:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=88a944eef8a4f9a2ca647eb16202a2b63f8ba7cd'/>
<id>urn:sha1:88a944eef8a4f9a2ca647eb16202a2b63f8ba7cd</id>
<content type='text'>
This reverts commit 30902dc3cb0ea1cfc7ac2b17bcf478ff98420d74.

It causes all kinds of problems, based upon a report by
Bernard (f6bvp) and analysis by Jarek Poplawski.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>AX.25: Fix sysctl registration if !CONFIG_AX25_DAMA_SLAVE</title>
<updated>2008-08-06T01:46:57Z</updated>
<author>
<name>Ralf Baechle</name>
</author>
<published>2008-08-06T01:46:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ffb208479bd62ab26c29a242faeb1de1c6d5fcdc'/>
<id>urn:sha1:ffb208479bd62ab26c29a242faeb1de1c6d5fcdc</id>
<content type='text'>
Since 49ffcf8f99e8d33ec8afb450956804af518fd788 ("sysctl: update
sysctl_check_table") setting struct ctl_table.procname = NULL does no
longer work as it used to the way the AX.25 code is expecting it to
resulting in the AX.25 sysctl registration code to break if
CONFIG_AX25_DAMA_SLAVE was not set as in some distribution kernels.
Kernel releases from 2.6.24 are affected.

Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netns: Use net_eq() to compare net-namespaces for optimization.</title>
<updated>2008-07-20T05:34:43Z</updated>
<author>
<name>YOSHIFUJI Hideaki</name>
</author>
<published>2008-07-20T05:34:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=721499e8931c5732202481ae24f2dfbf9910f129'/>
<id>urn:sha1:721499e8931c5732202481ae24f2dfbf9910f129</id>
<content type='text'>
Without CONFIG_NET_NS, namespace is always &amp;init_net.
Compiler will be able to omit namespace comparisons with this patch.

Signed-off-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ax25: Fix std timer socket destroy handling.</title>
<updated>2008-06-18T04:26:37Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2008-06-18T04:26:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=30902dc3cb0ea1cfc7ac2b17bcf478ff98420d74'/>
<id>urn:sha1:30902dc3cb0ea1cfc7ac2b17bcf478ff98420d74</id>
<content type='text'>
Tihomir Heidelberg - 9a4gl, reports:

--------------------
I would like to direct you attention to one problem existing in ax.25
kernel since 2.4. If listening socket is closed and its SKB queue is
released but those sockets get weird. Those "unAccepted()" sockets
should be destroyed in ax25_std_heartbeat_expiry, but it will not
happen. And there is also a note about that in ax25_std_timer.c:
/* Magic here: If we listen() and a new link dies before it
is accepted() it isn't 'dead' so doesn't get removed. */

This issue cause ax25d to stop accepting new connections and I had to
restarted ax25d approximately each day and my services were unavailable.
Also netstat -n -l shows invalid source and device for those listening
sockets. It is strange why ax25d's listening socket get weird because of
this issue, but definitely when I solved this bug I do not have problems
with ax25d anymore and my ax25d can run for months without problems.
--------------------

Actually as far as I can see, this problem is even in releases
as far back as 2.2.x as well.

It seems senseless to special case this test on TCP_LISTEN state.
Anything still stuck in state 0 has no external references and
we can just simply kill it off directly.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ax25: Use sock_graft() and remove bogus sk_socket and sk_sleep init.</title>
<updated>2008-06-17T09:20:54Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2008-06-17T09:20:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9375cb8a1232d2a15fe34bec4d3474872e02faec'/>
<id>urn:sha1:9375cb8a1232d2a15fe34bec4d3474872e02faec</id>
<content type='text'>
The way that listening sockets work in ax25 is that the packet input
code path creates new socks via ax25_make_new() and attaches them
to the incoming SKB.  This SKB gets queued up into the listening
socket's receive queue.

When accept()'d the sock gets hooked up to the real parent socket.
Alternatively, if the listening socket is closed and released, any
unborn socks stuff up in the receive queue get released.

So during this time period these sockets are unreachable in any
other way, so no wakeup events nor references to their -&gt;sk_socket
and -&gt;sk_sleep members can occur.  And even if they do, all such
paths have to make NULL checks.

So do not deceptively initialize them in ax25_make_new() to the
values in the listening socket.  Leave them at NULL.

Finally, use sock_graft() in ax25_accept().

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
