<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/net/ax25, branch v4.8-rc3</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.8-rc3</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.8-rc3'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2016-06-19T03:55:34+00:00</updated>
<entry>
<title>AX.25: Close socket connection on session completion</title>
<updated>2016-06-19T03:55:34+00:00</updated>
<author>
<name>Basil Gunn</name>
<email>basil@pacabunga.com</email>
</author>
<published>2016-06-16T16:42:30+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4a7d99ea1b27734558feb6833f180cd38a159940'/>
<id>urn:sha1:4a7d99ea1b27734558feb6833f180cd38a159940</id>
<content type='text'>
A socket connection made in ax.25 is not closed when session is
completed.  The heartbeat timer is stopped prematurely and this is
where the socket gets closed. Allow heatbeat timer to run to close
socket. Symptom occurs in kernels &gt;= 4.2.0

Originally sent 6/15/2016. Resend with distribution list matching
scripts/maintainer.pl output.

Signed-off-by: Basil Gunn &lt;basil@pacabunga.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ax25: add link layer header validation function</title>
<updated>2016-03-10T03:13:01+00:00</updated>
<author>
<name>Willem de Bruijn</name>
<email>willemb@google.com</email>
</author>
<published>2016-03-10T02:58:33+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ea47781c26510e5d97f80f9aceafe9065bd5e3aa'/>
<id>urn:sha1:ea47781c26510e5d97f80f9aceafe9065bd5e3aa</id>
<content type='text'>
As variable length protocol, AX25 fails link layer header validation
tests based on a minimum length. header_ops.validate allows protocols
to validate headers that are shorter than hard_header_len. Implement
this callback for AX25.

See also http://comments.gmane.org/gmane.linux.network/401064

Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: add validation for the socket syscall protocol argument</title>
<updated>2015-12-14T21:09:30+00:00</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2015-12-14T21:03:39+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=79462ad02e861803b3840cc782248c7359451cd9'/>
<id>urn:sha1:79462ad02e861803b3840cc782248c7359451cd9</id>
<content type='text'>
郭永刚 reported that one could simply crash the kernel as root by
using a simple program:

	int socket_fd;
	struct sockaddr_in addr;
	addr.sin_port = 0;
	addr.sin_addr.s_addr = INADDR_ANY;
	addr.sin_family = 10;

	socket_fd = socket(10,3,0x40000000);
	connect(socket_fd , &amp;addr,16);

AF_INET, AF_INET6 sockets actually only support 8-bit protocol
identifiers. inet_sock's skc_protocol field thus is sized accordingly,
thus larger protocol identifiers simply cut off the higher bits and
store a zero in the protocol fields.

This could lead to e.g. NULL function pointer because as a result of
the cut off inet_num is zero and we call down to inet_autobind, which
is NULL for raw sockets.

kernel: Call Trace:
kernel:  [&lt;ffffffff816db90e&gt;] ? inet_autobind+0x2e/0x70
kernel:  [&lt;ffffffff816db9a4&gt;] inet_dgram_connect+0x54/0x80
kernel:  [&lt;ffffffff81645069&gt;] SYSC_connect+0xd9/0x110
kernel:  [&lt;ffffffff810ac51b&gt;] ? ptrace_notify+0x5b/0x80
kernel:  [&lt;ffffffff810236d8&gt;] ? syscall_trace_enter_phase2+0x108/0x200
kernel:  [&lt;ffffffff81645e0e&gt;] SyS_connect+0xe/0x10
kernel:  [&lt;ffffffff81779515&gt;] tracesys_phase2+0x84/0x89

I found no particular commit which introduced this problem.

CVE: CVE-2015-8543
Cc: Cong Wang &lt;cwang@twopensource.com&gt;
Reported-by: 郭永刚 &lt;guoyonggang@360.cn&gt;
Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>NET: AX.25: Stop heartbeat timer on disconnect.</title>
<updated>2015-07-15T22:59:58+00:00</updated>
<author>
<name>Richard Stearn</name>
<email>richard@rns-stearn.demon.co.uk</email>
</author>
<published>2015-07-13T09:38:24+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=da278622bf04f8ddb14519a2b8214e108ef26101'/>
<id>urn:sha1:da278622bf04f8ddb14519a2b8214e108ef26101</id>
<content type='text'>
This may result in a kernel panic.  The bug has always existed but
somehow we've run out of luck now and it bites.

Signed-off-by: Richard Stearn &lt;richard@rns-stearn.demon.co.uk&gt;
Cc: stable@vger.kernel.org	# all branches
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>ax25: Stop using sock-&gt;sk_protinfo.</title>
<updated>2015-06-28T23:55:44+00:00</updated>
<author>
<name>David Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2015-06-25T13:19:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=3200392b88dd25f0d60a500a38d1ce538eb7f933'/>
<id>urn:sha1:3200392b88dd25f0d60a500a38d1ce538eb7f933</id>
<content type='text'>
Just make a ax25_sock structure that provides the ax25_cb pointer.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: Remove spurios included of netfilter.h</title>
<updated>2015-06-18T19:14:32+00:00</updated>
<author>
<name>Eric W Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2015-06-17T15:28:35+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8f481b50ea653ff0aea6accbb4bb02a15cf00531'/>
<id>urn:sha1:8f481b50ea653ff0aea6accbb4bb02a15cf00531</id>
<content type='text'>
While testing my netfilter changes I noticed several files where
recompiling unncessarily because they unncessarily included
netfilter.h.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>net: Pass kern from net_proto_family.create to sk_alloc</title>
<updated>2015-05-11T14:50:17+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2015-05-09T02:09:13+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=11aa9c28b4209242a9de0a661a7b3405adb568a0'/>
<id>urn:sha1:11aa9c28b4209242a9de0a661a7b3405adb568a0</id>
<content type='text'>
In preparation for changing how struct net is refcounted
on kernel sockets pass the knowledge that we are creating
a kernel socket from sock_create_kern through to sk_alloc.

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>ax25: Fix the build when CONFIG_INET is disabled</title>
<updated>2015-03-05T18:17:39+00:00</updated>
<author>
<name>kbuild test robot</name>
<email>fengguang.wu@intel.com</email>
</author>
<published>2015-03-05T12:54:00+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=787fb2bd42b9d798f4ed85b66e878222a9e28ae6'/>
<id>urn:sha1:787fb2bd42b9d798f4ed85b66e878222a9e28ae6</id>
<content type='text'>
&gt;
&gt; &gt;&gt; net/ax25/ax25_ip.c:225:26: error: unknown type name 'sturct'
&gt;     netdev_tx_t ax25_ip_xmit(sturct sk_buff *skb)
&gt;                              ^
&gt;
&gt; vim +/sturct +225 net/ax25/ax25_ip.c
&gt;
&gt;    219				    unsigned short type, const void *daddr,
&gt;    220				    const void *saddr, unsigned int len)
&gt;    221	{
&gt;    222		return -AX25_HEADER_LEN;
&gt;    223	}
&gt;    224
&gt;  &gt; 225	netdev_tx_t ax25_ip_xmit(sturct sk_buff *skb)
&gt;    226	{
&gt;    227		kfree_skb(skb);
&gt;    228		return NETDEV_TX_OK;

Ooops I misspelled struct...

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>ax25: Stop using magic neighbour cache operations.</title>
<updated>2015-03-03T19:44:41+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2015-03-03T15:41:47+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1d5da757da860a6916adbf68b09e868062b4b3b8'/>
<id>urn:sha1:1d5da757da860a6916adbf68b09e868062b4b3b8</id>
<content type='text'>
Before the ax25 stack calls dev_queue_xmit it always calls
ax25_type_trans which sets skb-&gt;protocol to ETH_P_AX25.

Which means that by looking at the protocol type it is possible to
detect IP packets that have not been munged by the ax25 stack in
ndo_start_xmit and call a function to munge them.

Rename ax25_neigh_xmit to ax25_ip_xmit and tweak the return type and
value to be appropriate for an ndo_start_xmit function.

Update all of the ax25 devices to test the protocol type for ETH_P_IP
and return ax25_ip_xmit as the first thing they do.  This preserves
the existing semantics of IP packet processing, but the timing will be
a little different as the IP packets now pass through the qdisc layer
before reaching the ax25 ip packet processing.

Remove the now unnecessary ax25 neighbour table operations.

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>ax25: Stop depending on arp_find</title>
<updated>2015-03-02T21:43:41+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2015-03-02T06:09:42+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=945db424bfbcb7b72a92702a487dc0000cd1efed'/>
<id>urn:sha1:945db424bfbcb7b72a92702a487dc0000cd1efed</id>
<content type='text'>
Have ax25_neigh_output perform ordinary arp resolution before calling
ax25_neigh_xmit.

Call dev_hard_header in ax25_neigh_output with a destination address so
it will not fail, and the destination mac address will not need to be
set in ax25_neigh_xmit.

Remove arp_find from ax25_neigh_xmit (the ordinary arp resolution added
to ax25_neigh_output removes the need for calling arp_find).

Document how close ax25_neigh_output is to neigh_resolve_output.

Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: linux-hams@vger.kernel.org
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
