<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/x25, branch tegra</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>x25: Prevent skb overreads when checking call user data</title>
<updated>2011-10-17T23:31:40+00:00</updated>
<author>
<name>Matthew Daley</name>
<email>mattjd@gmail.com</email>
</author>
<published>2011-10-14T18:45:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7f81e25befdfb3272345a2e775f520e1d515fa20'/>
<id>7f81e25befdfb3272345a2e775f520e1d515fa20</id>
<content type='text'>
x25_find_listener does not check that the amount of call user data given
in the skb is big enough in per-socket comparisons, hence buffer
overreads may occur.  Fix this by adding a check.

Signed-off-by: Matthew Daley &lt;mattjd@gmail.com&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Acked-by: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
x25_find_listener does not check that the amount of call user data given
in the skb is big enough in per-socket comparisons, hence buffer
overreads may occur.  Fix this by adding a check.

Signed-off-by: Matthew Daley &lt;mattjd@gmail.com&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Acked-by: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x25: Handle undersized/fragmented skbs</title>
<updated>2011-10-17T23:31:39+00:00</updated>
<author>
<name>Matthew Daley</name>
<email>mattjd@gmail.com</email>
</author>
<published>2011-10-14T18:45:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cb101ed2c3c7c0224d16953fe77bfb9d6c2cb9df'/>
<id>cb101ed2c3c7c0224d16953fe77bfb9d6c2cb9df</id>
<content type='text'>
There are multiple locations in the X.25 packet layer where a skb is
assumed to be of at least a certain size and that all its data is
currently available at skb-&gt;data.  These assumptions are not checked,
hence buffer overreads may occur.  Use pskb_may_pull to check these
minimal size assumptions and ensure that data is available at skb-&gt;data
when necessary, as well as use skb_copy_bits where needed.

Signed-off-by: Matthew Daley &lt;mattjd@gmail.com&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Acked-by: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are multiple locations in the X.25 packet layer where a skb is
assumed to be of at least a certain size and that all its data is
currently available at skb-&gt;data.  These assumptions are not checked,
hence buffer overreads may occur.  Use pskb_may_pull to check these
minimal size assumptions and ensure that data is available at skb-&gt;data
when necessary, as well as use skb_copy_bits where needed.

Signed-off-by: Matthew Daley &lt;mattjd@gmail.com&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Acked-by: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x25: Validate incoming call user data lengths</title>
<updated>2011-10-17T23:31:39+00:00</updated>
<author>
<name>Matthew Daley</name>
<email>mattjd@gmail.com</email>
</author>
<published>2011-10-14T18:45:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c7fd0d48bde943e228e9c28ce971a22d6a1744c4'/>
<id>c7fd0d48bde943e228e9c28ce971a22d6a1744c4</id>
<content type='text'>
X.25 call user data is being copied in its entirety from incoming messages
without consideration to the size of the destination buffers, leading to
possible buffer overflows. Validate incoming call user data lengths before
these copies are performed.

It appears this issue was noticed some time ago, however nothing seemed to
come of it: see http://www.spinics.net/lists/linux-x25/msg00043.html and
commit 8db09f26f912f7c90c764806e804b558da520d4f.

Signed-off-by: Matthew Daley &lt;mattjd@gmail.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Tested-by: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
X.25 call user data is being copied in its entirety from incoming messages
without consideration to the size of the destination buffers, leading to
possible buffer overflows. Validate incoming call user data lengths before
these copies are performed.

It appears this issue was noticed some time ago, however nothing seemed to
come of it: see http://www.spinics.net/lists/linux-x25/msg00043.html and
commit 8db09f26f912f7c90c764806e804b558da520d4f.

Signed-off-by: Matthew Daley &lt;mattjd@gmail.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Tested-by: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x25: Reduce switch/case indent</title>
<updated>2011-07-01T23:11:16+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-07-01T09:43:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fddc5f3e9164858cd9264a17580f9fc5ad948458'/>
<id>fddc5f3e9164858cd9264a17580f9fc5ad948458</id>
<content type='text'>
Make the case labels the same indent as the switch.

git diff -w shows 80 column line reflowing.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the case labels the same indent as the switch.

git diff -w shows 80 column line reflowing.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23+00:00</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x25: remove the BKL</title>
<updated>2011-03-05T09:55:45+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2011-01-22T22:44:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=77b2283604bdd7053494a97b0e2fee97148206c6'/>
<id>77b2283604bdd7053494a97b0e2fee97148206c6</id>
<content type='text'>
This replaces all instances of lock_kernel in x25
with lock_sock, taking care to release the socket
lock around sleeping functions (sock_alloc_send_skb
and skb_recv_datagram). It is not clear whether
this is a correct solution, but it seem to be what
other protocols do in the same situation.

Includes a fix suggested by Eric Dumazet.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Tested-by: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Cc: linux-x25@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This replaces all instances of lock_kernel in x25
with lock_sock, taking care to release the socket
lock around sleeping functions (sock_alloc_send_skb
and skb_recv_datagram). It is not clear whether
this is a correct solution, but it seem to be what
other protocols do in the same situation.

Includes a fix suggested by Eric Dumazet.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Tested-by: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Cc: linux-x25@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x25: Do not reference freed memory.</title>
<updated>2011-02-10T06:36:13+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-02-10T05:48:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=96642d42f076101ba98866363d908cab706d156c'/>
<id>96642d42f076101ba98866363d908cab706d156c</id>
<content type='text'>
In x25_link_free(), we destroy 'nb' before dereferencing
'nb-&gt;dev'.  Don't do this, because 'nb' might be freed
by then.

Reported-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Tested-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In x25_link_free(), we destroy 'nb' before dereferencing
'nb-&gt;dev'.  Don't do this, because 'nb' might be freed
by then.

Reported-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Tested-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x25: possible skb leak on bad facilities</title>
<updated>2011-02-07T21:41:38+00:00</updated>
<author>
<name>andrew hendry</name>
<email>andrew.hendry@gmail.com</email>
</author>
<published>2011-02-07T00:08:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=95c3043008ca8449feb96aba5481fe31c2ea750b'/>
<id>95c3043008ca8449feb96aba5481fe31c2ea750b</id>
<content type='text'>
Originally x25_parse_facilities returned
-1 for an error
 0 meaning 0 length facilities
&gt;0 the length of the facilities parsed.

5ef41308f94dc ("x25: Prevent crashing when parsing bad X.25 facilities") introduced more
error checking in x25_parse_facilities however used 0 to indicate bad parsing
a6331d6f9a429 ("memory corruption in X.25 facilities parsing") followed this further for
DTE facilities, again using 0 for bad parsing.

The meaning of 0 got confused in the callers.
If the facilities are messed up we can't determine where the data starts.
So patch makes all parsing errors return -1 and ensures callers close and don't use the skb further.

Reported-by: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Originally x25_parse_facilities returned
-1 for an error
 0 meaning 0 length facilities
&gt;0 the length of the facilities parsed.

5ef41308f94dc ("x25: Prevent crashing when parsing bad X.25 facilities") introduced more
error checking in x25_parse_facilities however used 0 to indicate bad parsing
a6331d6f9a429 ("memory corruption in X.25 facilities parsing") followed this further for
DTE facilities, again using 0 for bad parsing.

The meaning of 0 got confused in the callers.
If the facilities are messed up we can't determine where the data starts.
So patch makes all parsing errors return -1 and ensures callers close and don't use the skb further.

Reported-by: Andy Whitcroft &lt;apw@canonical.com&gt;
Signed-off-by: Andrew Hendry &lt;andrew.hendry@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2010-12-08T21:47:38+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2010-12-08T21:15:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fe6c791570efe717946ea7b7dd50aec96b70d551'/>
<id>fe6c791570efe717946ea7b7dd50aec96b70d551</id>
<content type='text'>
Conflicts:
	drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
	net/llc/af_llc.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
	net/llc/af_llc.c
</pre>
</div>
</content>
</entry>
<entry>
<title>x25: decrement netdev reference counts on unload</title>
<updated>2010-12-08T20:13:44+00:00</updated>
<author>
<name>Apollon Oikonomopoulos</name>
<email>apollon@noc.grnet.gr</email>
</author>
<published>2010-12-07T09:43:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=171995e5d82dcc92bea37a7d2a2ecc21068a0f19'/>
<id>171995e5d82dcc92bea37a7d2a2ecc21068a0f19</id>
<content type='text'>
x25 does not decrement the network device reference counts on module unload.
Thus unregistering any pre-existing interface after unloading the x25 module
hangs and results in

 unregister_netdevice: waiting for tap0 to become free. Usage count = 1

This patch decrements the reference counts of all interfaces in x25_link_free,
the way it is already done in x25_link_device_down for NETDEV_DOWN events.

Signed-off-by: Apollon Oikonomopoulos &lt;apollon@noc.grnet.gr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
x25 does not decrement the network device reference counts on module unload.
Thus unregistering any pre-existing interface after unloading the x25 module
hangs and results in

 unregister_netdevice: waiting for tap0 to become free. Usage count = 1

This patch decrements the reference counts of all interfaces in x25_link_free,
the way it is already done in x25_link_device_down for NETDEV_DOWN events.

Signed-off-by: Apollon Oikonomopoulos &lt;apollon@noc.grnet.gr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
