<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/bluetooth/smp.c, branch v3.9-rc2</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>Bluetooth: Fix handling of unexpected SMP PDUs</title>
<updated>2013-01-31T17:35:42+00:00</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2013-01-29T16:44:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8cf9fa1240229cbdd888236c0c43fcbad680cf00'/>
<id>8cf9fa1240229cbdd888236c0c43fcbad680cf00</id>
<content type='text'>
The conn-&gt;smp_chan pointer can be NULL if SMP PDUs arrive at unexpected
moments. To avoid NULL pointer dereferences the code should be checking
for this and disconnect if an unexpected SMP PDU arrives. This patch
fixes the issue by adding a check for conn-&gt;smp_chan for all other PDUs
except pairing request and security request (which are are the first
PDUs to come to initialize the SMP context).

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
CC: stable@vger.kernel.org
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The conn-&gt;smp_chan pointer can be NULL if SMP PDUs arrive at unexpected
moments. To avoid NULL pointer dereferences the code should be checking
for this and disconnect if an unexpected SMP PDU arrives. This patch
fixes the issue by adding a check for conn-&gt;smp_chan for all other PDUs
except pairing request and security request (which are are the first
PDUs to come to initialize the SMP context).

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
CC: stable@vger.kernel.org
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2012-11-18T03:00:43+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-11-18T03:00:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=67f4efdce7d85282fbd5832cddc80a07eb89b6d6'/>
<id>67f4efdce7d85282fbd5832cddc80a07eb89b6d6</id>
<content type='text'>
Minor line offset auto-merges.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Minor line offset auto-merges.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix error status when pairing fails</title>
<updated>2012-11-09T15:45:37+00:00</updated>
<author>
<name>Paulo Sérgio</name>
<email>paulo.sergio@openbossa.org</email>
</author>
<published>2012-10-25T19:55:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=896ea28ea824d49671fc7e9315d9c5be491a644f'/>
<id>896ea28ea824d49671fc7e9315d9c5be491a644f</id>
<content type='text'>
When pairing fails due to wrong confirm value, the management layer
doesn't report a proper error status. It sends
MGMT_STATUS_CONNECT_FAILED instead of MGMT_STATUS_AUTH_FAILED.

Most of management functions that receive a status as a parameter
expects for it to be encoded as a HCI status. But when a SMP pairing
fails, the SMP layer sends the SMP reason as the error status to the
management layer.

This commit maps all SMP reasons to HCI_ERROR_AUTH_FAILURE, which will
be converted to MGMT_STATUS_AUTH_FAILED in the management layer.

Reported-by: Claudio Takahasi &lt;claudio.takahasi@openbossa.org&gt;
Reviewed-by: João Paulo Rechi Vita &lt;jprvita@openbossa.org&gt;
Signed-off-by: Paulo Sérgio &lt;paulo.sergio@openbossa.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When pairing fails due to wrong confirm value, the management layer
doesn't report a proper error status. It sends
MGMT_STATUS_CONNECT_FAILED instead of MGMT_STATUS_AUTH_FAILED.

Most of management functions that receive a status as a parameter
expects for it to be encoded as a HCI status. But when a SMP pairing
fails, the SMP layer sends the SMP reason as the error status to the
management layer.

This commit maps all SMP reasons to HCI_ERROR_AUTH_FAILURE, which will
be converted to MGMT_STATUS_AUTH_FAILED in the management layer.

Reported-by: Claudio Takahasi &lt;claudio.takahasi@openbossa.org&gt;
Reviewed-by: João Paulo Rechi Vita &lt;jprvita@openbossa.org&gt;
Signed-off-by: Paulo Sérgio &lt;paulo.sergio@openbossa.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless</title>
<updated>2012-10-23T15:41:46+00:00</updated>
<author>
<name>John W. Linville</name>
<email>linville@tuxdriver.com</email>
</author>
<published>2012-10-23T15:41:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9b34f40c20111ba658f88e1669598db494be1fbc'/>
<id>9b34f40c20111ba658f88e1669598db494be1fbc</id>
<content type='text'>
Conflicts:
	drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
	net/mac80211/mlme.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
	net/mac80211/mlme.c
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: SMP: Fix setting unknown auth_req bits</title>
<updated>2012-10-12T09:55:20+00:00</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2012-10-11T14:26:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=065a13e2cc665f6547dc7e8a9d6b6565badf940a'/>
<id>065a13e2cc665f6547dc7e8a9d6b6565badf940a</id>
<content type='text'>
When sending a pairing request or response we should not just blindly
copy the value that the remote device sent. Instead we should at least
make sure to mask out any unknown bits. This is particularly critical
from the upcoming LE Secure Connections feature perspective as
incorrectly indicating support for it (by copying the remote value)
would cause a failure to pair with devices that support it.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Cc: stable@kernel.org
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When sending a pairing request or response we should not just blindly
copy the value that the remote device sent. Instead we should at least
make sure to mask out any unknown bits. This is particularly critical
from the upcoming LE Secure Connections feature perspective as
incorrectly indicating support for it (by copying the remote value)
would cause a failure to pair with devices that support it.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Cc: stable@kernel.org
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Use __constant modifier for L2CAP SMP CID</title>
<updated>2012-10-11T06:25:58+00:00</updated>
<author>
<name>Syam Sidhardhan</name>
<email>s.syam@samsung.com</email>
</author>
<published>2012-10-10T16:39:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d8aece2af380a251daf2351d92dd38b9edf10b84'/>
<id>d8aece2af380a251daf2351d92dd38b9edf10b84</id>
<content type='text'>
Since the L2CAP_CID_SMP is constant, __constant_cpu_to_le16() is
the right go here.

Signed-off-by: Syam Sidhardhan &lt;s.syam@samsung.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the L2CAP_CID_SMP is constant, __constant_cpu_to_le16() is
the right go here.

Signed-off-by: Syam Sidhardhan &lt;s.syam@samsung.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Change signature of smp_conn_security()</title>
<updated>2012-08-27T15:07:18+00:00</updated>
<author>
<name>Vinicius Costa Gomes</name>
<email>vinicius.gomes@openbossa.org</email>
</author>
<published>2012-08-24T00:32:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cc110922da7e902b62d18641a370fec01a9fa794'/>
<id>cc110922da7e902b62d18641a370fec01a9fa794</id>
<content type='text'>
To make it clear that it may be called from contexts that may not have
any knowledge of L2CAP, we change the connection parameter, to receive
a hci_conn.

This also makes it clear that it is checking the security of the link.

Signed-off-by: Vinicius Costa Gomes &lt;vinicius.gomes@openbossa.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To make it clear that it may be called from contexts that may not have
any knowledge of L2CAP, we change the connection parameter, to receive
a hci_conn.

This also makes it clear that it is checking the security of the link.

Signed-off-by: Vinicius Costa Gomes &lt;vinicius.gomes@openbossa.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix use-after-free bug in SMP</title>
<updated>2012-08-15T04:06:23+00:00</updated>
<author>
<name>Andre Guedes</name>
<email>andre.guedes@openbossa.org</email>
</author>
<published>2012-08-01T23:34:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=61a0cfb008f57ecf7eb28ee762952fb42dc15d15'/>
<id>61a0cfb008f57ecf7eb28ee762952fb42dc15d15</id>
<content type='text'>
If SMP fails, we should always cancel security_timer delayed work.
Otherwise, security_timer function may run after l2cap_conn object
has been freed.

This patch fixes the following warning reported by ODEBUG:

WARNING: at lib/debugobjects.c:261 debug_print_object+0x7c/0x8d()
Hardware name: Bochs
ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x27
Modules linked in: btusb bluetooth
Pid: 440, comm: kworker/u:2 Not tainted 3.5.0-rc1+ #4
Call Trace:
 [&lt;ffffffff81174600&gt;] ? free_obj_work+0x4a/0x7f
 [&lt;ffffffff81023eb8&gt;] warn_slowpath_common+0x7e/0x97
 [&lt;ffffffff81023f65&gt;] warn_slowpath_fmt+0x41/0x43
 [&lt;ffffffff811746b1&gt;] debug_print_object+0x7c/0x8d
 [&lt;ffffffff810394f0&gt;] ? __queue_work+0x241/0x241
 [&lt;ffffffff81174fdd&gt;] debug_check_no_obj_freed+0x92/0x159
 [&lt;ffffffff810ac08e&gt;] slab_free_hook+0x6f/0x77
 [&lt;ffffffffa0019145&gt;] ? l2cap_conn_del+0x148/0x157 [bluetooth]
 [&lt;ffffffff810ae408&gt;] kfree+0x59/0xac
 [&lt;ffffffffa0019145&gt;] l2cap_conn_del+0x148/0x157 [bluetooth]
 [&lt;ffffffffa001b9a2&gt;] l2cap_recv_frame+0xa77/0xfa4 [bluetooth]
 [&lt;ffffffff810592f9&gt;] ? trace_hardirqs_on_caller+0x112/0x1ad
 [&lt;ffffffffa001c86c&gt;] l2cap_recv_acldata+0xe2/0x264 [bluetooth]
 [&lt;ffffffffa0002b2f&gt;] hci_rx_work+0x235/0x33c [bluetooth]
 [&lt;ffffffff81038dc3&gt;] ? process_one_work+0x126/0x2fe
 [&lt;ffffffff81038e22&gt;] process_one_work+0x185/0x2fe
 [&lt;ffffffff81038dc3&gt;] ? process_one_work+0x126/0x2fe
 [&lt;ffffffff81059f2e&gt;] ? lock_acquired+0x1b5/0x1cf
 [&lt;ffffffffa00028fa&gt;] ? le_scan_work+0x11d/0x11d [bluetooth]
 [&lt;ffffffff81036fb6&gt;] ? spin_lock_irq+0x9/0xb
 [&lt;ffffffff81039209&gt;] worker_thread+0xcf/0x175
 [&lt;ffffffff8103913a&gt;] ? rescuer_thread+0x175/0x175
 [&lt;ffffffff8103cfe0&gt;] kthread+0x95/0x9d
 [&lt;ffffffff812c5054&gt;] kernel_threadi_helper+0x4/0x10
 [&lt;ffffffff812c36b0&gt;] ? retint_restore_args+0x13/0x13
 [&lt;ffffffff8103cf4b&gt;] ? flush_kthread_worker+0xdb/0xdb
 [&lt;ffffffff812c5050&gt;] ? gs_change+0x13/0x13

This bug can be reproduced using hctool lecc or l2test tools and
bluetoothd not running.

Signed-off-by: Andre Guedes &lt;andre.guedes@openbossa.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If SMP fails, we should always cancel security_timer delayed work.
Otherwise, security_timer function may run after l2cap_conn object
has been freed.

This patch fixes the following warning reported by ODEBUG:

WARNING: at lib/debugobjects.c:261 debug_print_object+0x7c/0x8d()
Hardware name: Bochs
ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x27
Modules linked in: btusb bluetooth
Pid: 440, comm: kworker/u:2 Not tainted 3.5.0-rc1+ #4
Call Trace:
 [&lt;ffffffff81174600&gt;] ? free_obj_work+0x4a/0x7f
 [&lt;ffffffff81023eb8&gt;] warn_slowpath_common+0x7e/0x97
 [&lt;ffffffff81023f65&gt;] warn_slowpath_fmt+0x41/0x43
 [&lt;ffffffff811746b1&gt;] debug_print_object+0x7c/0x8d
 [&lt;ffffffff810394f0&gt;] ? __queue_work+0x241/0x241
 [&lt;ffffffff81174fdd&gt;] debug_check_no_obj_freed+0x92/0x159
 [&lt;ffffffff810ac08e&gt;] slab_free_hook+0x6f/0x77
 [&lt;ffffffffa0019145&gt;] ? l2cap_conn_del+0x148/0x157 [bluetooth]
 [&lt;ffffffff810ae408&gt;] kfree+0x59/0xac
 [&lt;ffffffffa0019145&gt;] l2cap_conn_del+0x148/0x157 [bluetooth]
 [&lt;ffffffffa001b9a2&gt;] l2cap_recv_frame+0xa77/0xfa4 [bluetooth]
 [&lt;ffffffff810592f9&gt;] ? trace_hardirqs_on_caller+0x112/0x1ad
 [&lt;ffffffffa001c86c&gt;] l2cap_recv_acldata+0xe2/0x264 [bluetooth]
 [&lt;ffffffffa0002b2f&gt;] hci_rx_work+0x235/0x33c [bluetooth]
 [&lt;ffffffff81038dc3&gt;] ? process_one_work+0x126/0x2fe
 [&lt;ffffffff81038e22&gt;] process_one_work+0x185/0x2fe
 [&lt;ffffffff81038dc3&gt;] ? process_one_work+0x126/0x2fe
 [&lt;ffffffff81059f2e&gt;] ? lock_acquired+0x1b5/0x1cf
 [&lt;ffffffffa00028fa&gt;] ? le_scan_work+0x11d/0x11d [bluetooth]
 [&lt;ffffffff81036fb6&gt;] ? spin_lock_irq+0x9/0xb
 [&lt;ffffffff81039209&gt;] worker_thread+0xcf/0x175
 [&lt;ffffffff8103913a&gt;] ? rescuer_thread+0x175/0x175
 [&lt;ffffffff8103cfe0&gt;] kthread+0x95/0x9d
 [&lt;ffffffff812c5054&gt;] kernel_threadi_helper+0x4/0x10
 [&lt;ffffffff812c36b0&gt;] ? retint_restore_args+0x13/0x13
 [&lt;ffffffff8103cf4b&gt;] ? flush_kthread_worker+0xdb/0xdb
 [&lt;ffffffff812c5050&gt;] ? gs_change+0x13/0x13

This bug can be reproduced using hctool lecc or l2test tools and
bluetoothd not running.

Signed-off-by: Andre Guedes &lt;andre.guedes@openbossa.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: smp: Fix possible NULL dereference</title>
<updated>2012-08-06T18:19:37+00:00</updated>
<author>
<name>Andrei Emeltchenko</name>
<email>andrei.emeltchenko@intel.com</email>
</author>
<published>2012-07-19T14:03:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d08fd0e712a834d4abb869c0215a702e290bc51e'/>
<id>d08fd0e712a834d4abb869c0215a702e290bc51e</id>
<content type='text'>
smp_chan_create might return NULL so we need to check before
dereferencing smp.

Signed-off-by: Andrei Emeltchenko &lt;andrei.emeltchenko@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
smp_chan_create might return NULL so we need to check before
dereferencing smp.

Signed-off-by: Andrei Emeltchenko &lt;andrei.emeltchenko@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless</title>
<updated>2012-06-13T19:35:35+00:00</updated>
<author>
<name>John W. Linville</name>
<email>linville@tuxdriver.com</email>
</author>
<published>2012-06-13T19:35:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=211c17aaee644bb808fbdeef547ac99db92c01ed'/>
<id>211c17aaee644bb808fbdeef547ac99db92c01ed</id>
<content type='text'>
Conflicts:
	drivers/net/wireless/ath/ath9k/main.c
	net/bluetooth/hci_event.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/wireless/ath/ath9k/main.c
	net/bluetooth/hci_event.c
</pre>
</div>
</content>
</entry>
</feed>
