<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/irda/af_irda.c, branch v3.4.71</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>irda: Fix missing msg_namelen update in irda_recvmsg_dgram()</title>
<updated>2013-05-01T16:41:05+00:00</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2013-04-07T01:51:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d3dd6298cdf289b410c030f0d329020cffd85a1d'/>
<id>d3dd6298cdf289b410c030f0d329020cffd85a1d</id>
<content type='text'>
[ Upstream commit 5ae94c0d2f0bed41d6718be743985d61b7f5c47d ]

The current code does not fill the msg_name member in case it is set.
It also does not set the msg_namelen member to 0 and therefore makes
net/socket.c leak the local, uninitialized sockaddr_storage variable
to userland -- 128 bytes of kernel stack memory.

Fix that by simply setting msg_namelen to 0 as obviously nobody cared
about irda_recvmsg_dgram() not filling the msg_name in case it was
set.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Cc: Samuel Ortiz &lt;samuel@sortiz.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 5ae94c0d2f0bed41d6718be743985d61b7f5c47d ]

The current code does not fill the msg_name member in case it is set.
It also does not set the msg_namelen member to 0 and therefore makes
net/socket.c leak the local, uninitialized sockaddr_storage variable
to userland -- 128 bytes of kernel stack memory.

Fix that by simply setting msg_namelen to 0 as obviously nobody cared
about irda_recvmsg_dgram() not filling the msg_name in case it was
set.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Cc: Samuel Ortiz &lt;samuel@sortiz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/irda: add missing error path release_sock call</title>
<updated>2013-04-05T17:04:34+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2013-03-20T05:19:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=afc309756f7bf90739eb24f04ce302ea70a69645'/>
<id>afc309756f7bf90739eb24f04ce302ea70a69645</id>
<content type='text'>
commit 896ee0eee6261e30c3623be931c3f621428947df upstream.

This makes sure that release_sock is called for all error conditions in
irda_getsockopt.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reported-by: Brad Spengler &lt;spender@grsecurity.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 896ee0eee6261e30c3623be931c3f621428947df upstream.

This makes sure that release_sock is called for all error conditions in
irda_getsockopt.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reported-by: Brad Spengler &lt;spender@grsecurity.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>irda: use msecs_to_jiffies() rather than manual calculation</title>
<updated>2011-12-21T20:46:22+00:00</updated>
<author>
<name>Xi Wang</name>
<email>xi.wang@gmail.com</email>
</author>
<published>2011-12-21T02:57:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7d6c429b263c2f735f3df8c282cc77a8659e5d74'/>
<id>7d6c429b263c2f735f3df8c282cc77a8659e5d74</id>
<content type='text'>
Also use mod_timer() instead of direct assignment to "expires".

Signed-off-by: Xi Wang &lt;xi.wang@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>
Also use mod_timer() instead of direct assignment to "expires".

Signed-off-by: Xi Wang &lt;xi.wang@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Remove casts of void *</title>
<updated>2011-06-17T03:19:27+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-06-13T16:21:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ea110733874d5176cb56dcf612a629ffac09dbf0'/>
<id>ea110733874d5176cb56dcf612a629ffac09dbf0</id>
<content type='text'>
Unnecessary casts of void * clutter the code.

These are the remainder casts after several specific
patches to remove netdev_priv and dev_priv.

Done via coccinelle script:

$ cat cast_void_pointer.cocci
@@
type T;
T *pt;
void *pv;
@@

- pt = (T *)pv;
+ pt = pv;

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Paul Moore &lt;paul.moore@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@conan.davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unnecessary casts of void * clutter the code.

These are the remainder casts after several specific
patches to remove netdev_priv and dev_priv.

Done via coccinelle script:

$ cat cast_void_pointer.cocci
@@
type T;
T *pt;
void *pv;
@@

- pt = (T *)pv;
+ pt = pv;

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Paul Moore &lt;paul.moore@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@conan.davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>irda: fix locking unbalance in irda_sendmsg</title>
<updated>2011-04-12T22:29:54+00:00</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2011-04-12T22:29:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=020318d0d2af51e0fd59ba654ede9b2171558720'/>
<id>020318d0d2af51e0fd59ba654ede9b2171558720</id>
<content type='text'>
5b40964eadea40509d353318d2c82e8b7bf5e8a5 ("irda: Remove BKL instances
from af_irda.c") introduced a path where we have a locking unbalance.
If we pass invalid flags, we unlock a socket we never locked,
resulting in this...

=====================================
[ BUG: bad unlock balance detected! ]
-------------------------------------
trinity/20101 is trying to release lock (sk_lock-AF_IRDA) at:
[&lt;ffffffffa057f001&gt;] irda_sendmsg+0x207/0x21d [irda]
but there are no more locks to release!

other info that might help us debug this:
no locks held by trinity/20101.

stack backtrace:
Pid: 20101, comm: trinity Not tainted 2.6.39-rc3+ #3
Call Trace:
 [&lt;ffffffffa057f001&gt;] ? irda_sendmsg+0x207/0x21d [irda]
 [&lt;ffffffff81085041&gt;] print_unlock_inbalance_bug+0xc7/0xd2
 [&lt;ffffffffa057f001&gt;] ? irda_sendmsg+0x207/0x21d [irda]
 [&lt;ffffffff81086aca&gt;] lock_release+0xcf/0x18e
 [&lt;ffffffff813ed190&gt;] release_sock+0x2d/0x155
 [&lt;ffffffffa057f001&gt;] irda_sendmsg+0x207/0x21d [irda]
 [&lt;ffffffff813e9f8c&gt;] __sock_sendmsg+0x69/0x75
 [&lt;ffffffff813ea105&gt;] sock_sendmsg+0xa1/0xb6
 [&lt;ffffffff81100ca3&gt;] ? might_fault+0x5c/0xac
 [&lt;ffffffff81086b7c&gt;] ? lock_release+0x181/0x18e
 [&lt;ffffffff81100cec&gt;] ? might_fault+0xa5/0xac
 [&lt;ffffffff81100ca3&gt;] ? might_fault+0x5c/0xac
 [&lt;ffffffff81133b94&gt;] ? fcheck_files+0xb9/0xf0
 [&lt;ffffffff813f387a&gt;] ? copy_from_user+0x2f/0x31
 [&lt;ffffffff813f3b70&gt;] ? verify_iovec+0x52/0xa6
 [&lt;ffffffff813eb4e3&gt;] sys_sendmsg+0x23a/0x2b8
 [&lt;ffffffff81086b7c&gt;] ? lock_release+0x181/0x18e
 [&lt;ffffffff810773c6&gt;] ? up_read+0x28/0x2c
 [&lt;ffffffff814bec3d&gt;] ? do_page_fault+0x360/0x3b4
 [&lt;ffffffff81087043&gt;] ? trace_hardirqs_on_caller+0x10b/0x12f
 [&lt;ffffffff810458aa&gt;] ? finish_task_switch+0xb2/0xe3
 [&lt;ffffffff8104583e&gt;] ? finish_task_switch+0x46/0xe3
 [&lt;ffffffff8108364a&gt;] ? trace_hardirqs_off_caller+0x33/0x90
 [&lt;ffffffff814bbaf9&gt;] ? retint_swapgs+0x13/0x1b
 [&lt;ffffffff81087043&gt;] ? trace_hardirqs_on_caller+0x10b/0x12f
 [&lt;ffffffff810a9dd3&gt;] ? audit_syscall_entry+0x11c/0x148
 [&lt;ffffffff8125609e&gt;] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [&lt;ffffffff814c22c2&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Dave Jones &lt;davej@redhat.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>
5b40964eadea40509d353318d2c82e8b7bf5e8a5 ("irda: Remove BKL instances
from af_irda.c") introduced a path where we have a locking unbalance.
If we pass invalid flags, we unlock a socket we never locked,
resulting in this...

=====================================
[ BUG: bad unlock balance detected! ]
-------------------------------------
trinity/20101 is trying to release lock (sk_lock-AF_IRDA) at:
[&lt;ffffffffa057f001&gt;] irda_sendmsg+0x207/0x21d [irda]
but there are no more locks to release!

other info that might help us debug this:
no locks held by trinity/20101.

stack backtrace:
Pid: 20101, comm: trinity Not tainted 2.6.39-rc3+ #3
Call Trace:
 [&lt;ffffffffa057f001&gt;] ? irda_sendmsg+0x207/0x21d [irda]
 [&lt;ffffffff81085041&gt;] print_unlock_inbalance_bug+0xc7/0xd2
 [&lt;ffffffffa057f001&gt;] ? irda_sendmsg+0x207/0x21d [irda]
 [&lt;ffffffff81086aca&gt;] lock_release+0xcf/0x18e
 [&lt;ffffffff813ed190&gt;] release_sock+0x2d/0x155
 [&lt;ffffffffa057f001&gt;] irda_sendmsg+0x207/0x21d [irda]
 [&lt;ffffffff813e9f8c&gt;] __sock_sendmsg+0x69/0x75
 [&lt;ffffffff813ea105&gt;] sock_sendmsg+0xa1/0xb6
 [&lt;ffffffff81100ca3&gt;] ? might_fault+0x5c/0xac
 [&lt;ffffffff81086b7c&gt;] ? lock_release+0x181/0x18e
 [&lt;ffffffff81100cec&gt;] ? might_fault+0xa5/0xac
 [&lt;ffffffff81100ca3&gt;] ? might_fault+0x5c/0xac
 [&lt;ffffffff81133b94&gt;] ? fcheck_files+0xb9/0xf0
 [&lt;ffffffff813f387a&gt;] ? copy_from_user+0x2f/0x31
 [&lt;ffffffff813f3b70&gt;] ? verify_iovec+0x52/0xa6
 [&lt;ffffffff813eb4e3&gt;] sys_sendmsg+0x23a/0x2b8
 [&lt;ffffffff81086b7c&gt;] ? lock_release+0x181/0x18e
 [&lt;ffffffff810773c6&gt;] ? up_read+0x28/0x2c
 [&lt;ffffffff814bec3d&gt;] ? do_page_fault+0x360/0x3b4
 [&lt;ffffffff81087043&gt;] ? trace_hardirqs_on_caller+0x10b/0x12f
 [&lt;ffffffff810458aa&gt;] ? finish_task_switch+0xb2/0xe3
 [&lt;ffffffff8104583e&gt;] ? finish_task_switch+0x46/0xe3
 [&lt;ffffffff8108364a&gt;] ? trace_hardirqs_off_caller+0x33/0x90
 [&lt;ffffffff814bbaf9&gt;] ? retint_swapgs+0x13/0x1b
 [&lt;ffffffff81087043&gt;] ? trace_hardirqs_on_caller+0x10b/0x12f
 [&lt;ffffffff810a9dd3&gt;] ? audit_syscall_entry+0x11c/0x148
 [&lt;ffffffff8125609e&gt;] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [&lt;ffffffff814c22c2&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2010-12-26T20:06:56+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-12-26T20:06:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d7c1255a3a21e98bdc64df8ccf005a174d7e6289'/>
<id>d7c1255a3a21e98bdc64df8ccf005a174d7e6289</id>
<content type='text'>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
  ipv4: dont create routes on down devices
  epic100: hamachi: yellowfin: Fix skb allocation size
  sundance: Fix oopses with corrupted skb_shared_info
  Revert "ipv4: Allow configuring subnets as local addresses"
  USB: mcs7830: return negative if auto negotiate fails
  irda: prevent integer underflow in IRLMP_ENUMDEVICES
  tcp: fix listening_get_next()
  atl1c: Do not use legacy PCI power management
  mac80211: fix mesh forwarding
  MAINTAINERS: email address change
  net: Fix range checks in tcf_valid_offset().
  net_sched: sch_sfq: fix allot handling
  hostap: remove netif_stop_queue from init
  mac80211/rt2x00: add ieee80211_tx_status_ni()
  typhoon: memory corruption in typhoon_get_drvinfo()
  net: Add USB PID for new MOSCHIP USB ethernet controller MCS7832 variant
  net_sched: always clone skbs
  ipv6: Fragment locally generated tunnel-mode IPSec6 packets as needed.
  netlink: fix gcc -Wconversion compilation warning
  asix: add USB ID for Logitec LAN-GTJ U2A
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
  ipv4: dont create routes on down devices
  epic100: hamachi: yellowfin: Fix skb allocation size
  sundance: Fix oopses with corrupted skb_shared_info
  Revert "ipv4: Allow configuring subnets as local addresses"
  USB: mcs7830: return negative if auto negotiate fails
  irda: prevent integer underflow in IRLMP_ENUMDEVICES
  tcp: fix listening_get_next()
  atl1c: Do not use legacy PCI power management
  mac80211: fix mesh forwarding
  MAINTAINERS: email address change
  net: Fix range checks in tcf_valid_offset().
  net_sched: sch_sfq: fix allot handling
  hostap: remove netif_stop_queue from init
  mac80211/rt2x00: add ieee80211_tx_status_ni()
  typhoon: memory corruption in typhoon_get_drvinfo()
  net: Add USB PID for new MOSCHIP USB ethernet controller MCS7832 variant
  net_sched: always clone skbs
  ipv6: Fragment locally generated tunnel-mode IPSec6 packets as needed.
  netlink: fix gcc -Wconversion compilation warning
  asix: add USB ID for Logitec LAN-GTJ U2A
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>irda: prevent integer underflow in IRLMP_ENUMDEVICES</title>
<updated>2010-12-23T18:09:43+00:00</updated>
<author>
<name>Dan Rosenberg</name>
<email>drosenberg@vsecurity.com</email>
</author>
<published>2010-12-22T13:58:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fdac1e0697356ac212259f2147aa60c72e334861'/>
<id>fdac1e0697356ac212259f2147aa60c72e334861</id>
<content type='text'>
If the user-provided len is less than the expected offset, the
IRLMP_ENUMDEVICES getsockopt will do a copy_to_user() with a very large
size value.  While this isn't be a security issue on x86 because it will
get caught by the access_ok() check, it may leak large amounts of kernel
heap on other architectures.  In any event, this patch fixes it.

Signed-off-by: Dan Rosenberg &lt;drosenberg@vsecurity.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>
If the user-provided len is less than the expected offset, the
IRLMP_ENUMDEVICES getsockopt will do a copy_to_user() with a very large
size value.  While this isn't be a security issue on x86 because it will
get caught by the access_ok() check, it may leak large amounts of kernel
heap on other architectures.  In any event, this patch fixes it.

Signed-off-by: Dan Rosenberg &lt;drosenberg@vsecurity.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>BKL: remove extraneous #include &lt;smp_lock.h&gt;</title>
<updated>2010-11-17T16:59:32+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2010-11-17T15:26:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=451a3c24b0135bce54542009b5fde43846c7cf67'/>
<id>451a3c24b0135bce54542009b5fde43846c7cf67</id>
<content type='text'>
The big kernel lock has been removed from all these files at some point,
leaving only the #include.

Remove this too as a cleanup.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The big kernel lock has been removed from all these files at some point,
leaving only the #include.

Remove this too as a cleanup.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>irda: Remove BKL instances from af_irda.c</title>
<updated>2010-10-11T00:11:23+00:00</updated>
<author>
<name>Samuel Ortiz</name>
<email>samuel@sortiz.org</email>
</author>
<published>2010-10-10T22:46:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5b40964eadea40509d353318d2c82e8b7bf5e8a5'/>
<id>5b40964eadea40509d353318d2c82e8b7bf5e8a5</id>
<content type='text'>
Most of the times, lock_kernel() was pointless or could simply be replaced
by lock_sock().

Signed-off-by: Samuel Ortiz &lt;samuel@sortiz.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most of the times, lock_kernel() was pointless or could simply be replaced
by lock_sock().

Signed-off-by: Samuel Ortiz &lt;samuel@sortiz.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: return operator cleanup</title>
<updated>2010-09-23T21:33:39+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-09-22T20:43:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a02cec2155fbea457eca8881870fd2de1a4c4c76'/>
<id>a02cec2155fbea457eca8881870fd2de1a4c4c76</id>
<content type='text'>
Change "return (EXPR);" to "return EXPR;"

return is not a function, parentheses are not required.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@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>
Change "return (EXPR);" to "return EXPR;"

return is not a function, parentheses are not required.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
