<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/ax25, branch linux-4.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-07-11T03:07:01Z</updated>
<entry>
<title>ax25: add link layer header validation function</title>
<updated>2016-07-11T03:07:01Z</updated>
<author>
<name>Willem de Bruijn</name>
</author>
<published>2016-03-10T02:58:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58ba5f64ecb7c1909c060793be9e46cc28b417db'/>
<id>urn:sha1:58ba5f64ecb7c1909c060793be9e46cc28b417db</id>
<content type='text'>
[ Upstream commit ea47781c26510e5d97f80f9aceafe9065bd5e3aa ]

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;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>net: add validation for the socket syscall protocol argument</title>
<updated>2016-01-23T04:54:13Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
</author>
<published>2015-12-14T21:03:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bc8f79b522b57ca79a676615003d85b08162ff5a'/>
<id>urn:sha1:bc8f79b522b57ca79a676615003d85b08162ff5a</id>
<content type='text'>
[ Upstream commit 79462ad02e861803b3840cc782248c7359451cd9 ]

郭永刚 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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ax25: Fix the build when CONFIG_INET is disabled</title>
<updated>2015-03-05T18:17:39Z</updated>
<author>
<name>kbuild test robot</name>
</author>
<published>2015-03-05T12:54:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:41Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2015-03-03T15:41:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:41Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2015-03-02T06:09:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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>
<entry>
<title>ax25: Stop calling/abusing dev_rebuild_header</title>
<updated>2015-03-02T21:43:40Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2015-03-02T06:08:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=abb7b755d9af48c762a6f814e4cead677e694f93'/>
<id>urn:sha1:abb7b755d9af48c762a6f814e4cead677e694f93</id>
<content type='text'>
- Rename ax25_rebuild_header to ax25_neigh_xmit and call it from
  ax25_neigh_output directly.  The rename is to make it clear
  that this is not a rebuild_header operation.

- Remove ax25_rebuild_header from ax25_header_ops.

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>
<entry>
<title>neigh: Move neigh_compat_output into ax25_ip.c</title>
<updated>2015-03-02T21:43:40Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2015-03-02T06:07:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=def6775369fab9d36817b9a6bc58cab67f53f1dc'/>
<id>urn:sha1:def6775369fab9d36817b9a6bc58cab67f53f1dc</id>
<content type='text'>
The only caller is now is ax25_neigh_construct so move
neigh_compat_output into ax25_ip.c make it static and rename it
ax25_neigh_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>
<entry>
<title>ax25: Refactor to use private neighbour operations.</title>
<updated>2015-03-02T21:43:40Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2015-03-02T06:05:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3b6a94bed0029a6b48055d89b8dea0567abca0ac'/>
<id>urn:sha1:3b6a94bed0029a6b48055d89b8dea0567abca0ac</id>
<content type='text'>
AX25 already has it's own private arp cache operations to isolate
it's abuse of dev_rebuild_header to transmit packets.  Add a function
ax25_neigh_construct that will allow all of the ax25 devices to
force using these operations, so that the generic arp code does
not need to.

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>
<entry>
<title>ax25: Make ax25_header and ax25_rebuild_header static</title>
<updated>2015-03-02T21:43:40Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2015-03-02T06:04:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=46d4e47abee04c24055114d50e408078a09c4d36'/>
<id>urn:sha1:46d4e47abee04c24055114d50e408078a09c4d36</id>
<content type='text'>
The only user is in ax25_ip.c so stop exporting these functions.

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>
<entry>
<title>ax25: In ax25_rebuild_header add missing kfree_skb</title>
<updated>2015-03-02T21:43:39Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2015-03-02T05:59:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e18dbd059319ac8d3fc0a0a23f6a8abcb9a59a31'/>
<id>urn:sha1:e18dbd059319ac8d3fc0a0a23f6a8abcb9a59a31</id>
<content type='text'>
In the unlikely (impossible?) event that we attempt to transmit
an ax25 packet over a non-ax25 device free the skb so we don't
leak it.

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>
