<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/irda, branch v2.6.39</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<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.tavy.me/linux.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>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.tavy.me/linux.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>irda: validate peer name and attribute lengths</title>
<updated>2011-03-28T00:59:02+00:00</updated>
<author>
<name>Dan Rosenberg</name>
<email>drosenberg@vsecurity.com</email>
</author>
<published>2011-03-20T15:32:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d370af0ef7951188daeb15bae75db7ba57c67846'/>
<id>d370af0ef7951188daeb15bae75db7ba57c67846</id>
<content type='text'>
Length fields provided by a peer for names and attributes may be longer
than the destination array sizes.  Validate lengths to prevent stack
buffer overflows.

Signed-off-by: Dan Rosenberg &lt;drosenberg@vsecurity.com&gt;
Cc: stable@kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Length fields provided by a peer for names and attributes may be longer
than the destination array sizes.  Validate lengths to prevent stack
buffer overflows.

Signed-off-by: Dan Rosenberg &lt;drosenberg@vsecurity.com&gt;
Cc: stable@kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>irda: prevent heap corruption on invalid nickname</title>
<updated>2011-03-28T00:59:02+00:00</updated>
<author>
<name>Dan Rosenberg</name>
<email>drosenberg@vsecurity.com</email>
</author>
<published>2011-03-19T20:14:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d50e7e3604778bfc2dc40f440e0742dbae399d54'/>
<id>d50e7e3604778bfc2dc40f440e0742dbae399d54</id>
<content type='text'>
Invalid nicknames containing only spaces will result in an underflow in
a memcpy size calculation, subsequently destroying the heap and
panicking.

v2 also catches the case where the provided nickname is longer than the
buffer size, which can result in controllable heap corruption.

Signed-off-by: Dan Rosenberg &lt;drosenberg@vsecurity.com&gt;
Cc: stable@kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Invalid nicknames containing only spaces will result in an underflow in
a memcpy size calculation, subsequently destroying the heap and
panicking.

v2 also catches the case where the provided nickname is longer than the
buffer size, which can result in controllable heap corruption.

Signed-off-by: Dan Rosenberg &lt;drosenberg@vsecurity.com&gt;
Cc: stable@kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tty: now phase out the ioctl file pointer for good</title>
<updated>2011-02-17T19:59:56+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2011-02-14T16:27:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6caa76b7786891b42b66a0e61e2c2fff2c884620'/>
<id>6caa76b7786891b42b66a0e61e2c2fff2c884620</id>
<content type='text'>
Only oddities here are a couple of drivers that bogusly called the ldisc
helpers instead of returning -ENOIOCTLCMD. Fix the bug and the rest goes
away.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only oddities here are a couple of drivers that bogusly called the ldisc
helpers instead of returning -ENOIOCTLCMD. Fix the bug and the rest goes
away.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tiocmset: kill the file pointer argument</title>
<updated>2011-02-17T19:52:43+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2011-02-14T16:26:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=20b9d17715017ae4dd4ec87fabc36d33b9de708e'/>
<id>20b9d17715017ae4dd4ec87fabc36d33b9de708e</id>
<content type='text'>
Doing tiocmget was such fun we should do tiocmset as well for the same
reasons

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Doing tiocmget was such fun we should do tiocmset as well for the same
reasons

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tiocmget: kill off the passing of the struct file</title>
<updated>2011-02-17T19:47:33+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2011-02-14T16:26:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=60b33c133ca0b7c0b6072c87234b63fee6e80558'/>
<id>60b33c133ca0b7c0b6072c87234b63fee6e80558</id>
<content type='text'>
We don't actually need this and it causes problems for internal use of
this functionality. Currently there is a single use of the FILE * pointer.
That is the serial core which uses it to check tty_hung_up_p. However if
that is true then IO_ERROR is also already set so the check may be removed.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't actually need this and it causes problems for internal use of
this functionality. Currently there is a single use of the FILE * pointer.
That is the serial core which uses it to check tty_hung_up_p. However if
that is true then IO_ERROR is also already set so the check may be removed.

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&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-27T06:37:05+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2010-12-27T06:37:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=17f7f4d9fcce8f1b75b5f735569309dee7665968'/>
<id>17f7f4d9fcce8f1b75b5f735569309dee7665968</id>
<content type='text'>
Conflicts:
	net/ipv4/fib_frontend.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	net/ipv4/fib_frontend.c
</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.tavy.me/linux.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.tavy.me/linux.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>
</feed>
