<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/bluetooth, branch v3.2.41</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/bluetooth?h=v3.2.41</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/bluetooth?h=v3.2.41'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-02-20T03:15:30Z</updated>
<entry>
<title>Bluetooth: Fix sending HCI commands after reset</title>
<updated>2013-02-20T03:15:30Z</updated>
<author>
<name>Szymon Janc</name>
<email>szymon.janc@tieto.com</email>
</author>
<published>2012-12-11T07:51:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f8c9c1f1f6ee0d09fa31016a26280aa0b4256740'/>
<id>urn:sha1:f8c9c1f1f6ee0d09fa31016a26280aa0b4256740</id>
<content type='text'>
commit dbccd791a3fbbdac12c33834b73beff3984988e9 upstream.

After sending reset command wait for its command complete event before
sending next command. Some chips sends CC event for command received
before reset if reset was send before chip replied with CC.

This is also required by specification that host shall not send
additional HCI commands before receiving CC for reset.

&lt; HCI Command: Reset (0x03|0x0003) plen 0                              [hci0] 18.404612
&gt; HCI Event: Command Complete (0x0e) plen 4                            [hci0] 18.405850
      Write Extended Inquiry Response (0x03|0x0052) ncmd 1
        Status: Success (0x00)
&lt; HCI Command: Read Local Supported Features (0x04|0x0003) plen 0      [hci0] 18.406079
&gt; HCI Event: Command Complete (0x0e) plen 4                            [hci0] 18.407864
      Reset (0x03|0x0003) ncmd 1
        Status: Success (0x00)
&lt; HCI Command: Read Local Supported Features (0x04|0x0003) plen 0      [hci0] 18.408062
&gt; HCI Event: Command Complete (0x0e) plen 12                           [hci0] 18.408835

Signed-off-by: Szymon Janc &lt;szymon.janc@tieto.com&gt;
Acked-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix handling of unexpected SMP PDUs</title>
<updated>2013-02-20T03:15:22Z</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2013-01-29T16:44:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=93322d7fee4bc923dfede42f78cad115027bfcd3'/>
<id>urn:sha1:93322d7fee4bc923dfede42f78cad115027bfcd3</id>
<content type='text'>
commit 8cf9fa1240229cbdd888236c0c43fcbad680cf00 upstream.

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;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix incorrect strncpy() in hidp_setup_hid()</title>
<updated>2013-02-06T04:33:42Z</updated>
<author>
<name>Anderson Lizardo</name>
<email>anderson.lizardo@openbossa.org</email>
</author>
<published>2013-01-06T22:28:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=150df53ab8dfcdf0b3872a60f7a092c4e541f138'/>
<id>urn:sha1:150df53ab8dfcdf0b3872a60f7a092c4e541f138</id>
<content type='text'>
commit 0a9ab9bdb3e891762553f667066190c1d22ad62b upstream.

The length parameter should be sizeof(req-&gt;name) - 1 because there is no
guarantee that string provided by userspace will contain the trailing
'\0'.

Can be easily reproduced by manually setting req-&gt;name to 128 non-zero
bytes prior to ioctl(HIDPCONNADD) and checking the device name setup on
input subsystem:

$ cat /sys/devices/pnp0/00\:04/tty/ttyS0/hci0/hci0\:1/input8/name
AAAAAA[...]AAAAAAAAf0:af:f0:af:f0:af

("f0:af:f0:af:f0:af" is the device bluetooth address, taken from "phys"
field in struct hid_device due to overflow.)

Signed-off-by: Anderson Lizardo &lt;anderson.lizardo@openbossa.org&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Add missing lock nesting notation</title>
<updated>2013-01-03T03:33:27Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2012-11-21T01:25:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=37021f68aa5cfe2b838bea7dfdeae99d7c9bdc6e'/>
<id>urn:sha1:37021f68aa5cfe2b838bea7dfdeae99d7c9bdc6e</id>
<content type='text'>
commit dc2a0e20fbc85a71c63aa4330b496fda33f6bf80 upstream.

This patch fixes the following report, it happens when accepting rfcomm
connections:

[  228.165378] =============================================
[  228.165378] [ INFO: possible recursive locking detected ]
[  228.165378] 3.7.0-rc1-00536-gc1d5dc4 #120 Tainted: G        W
[  228.165378] ---------------------------------------------
[  228.165378] bluetoothd/1341 is trying to acquire lock:
[  228.165378]  (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+...}, at:
[&lt;ffffffffa0000aa0&gt;] bt_accept_dequeue+0xa0/0x180 [bluetooth]
[  228.165378]
[  228.165378] but task is already holding lock:
[  228.165378]  (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+...}, at:
[&lt;ffffffffa0205118&gt;] rfcomm_sock_accept+0x58/0x2d0 [rfcomm]
[  228.165378]
[  228.165378] other info that might help us debug this:
[  228.165378]  Possible unsafe locking scenario:
[  228.165378]
[  228.165378]        CPU0
[  228.165378]        ----
[  228.165378]   lock(sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM);
[  228.165378]   lock(sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM);
[  228.165378]
[  228.165378]  *** DEADLOCK ***
[  228.165378]
[  228.165378]  May be due to missing lock nesting notation

Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Avoid calling undefined smp_conn_security()</title>
<updated>2012-11-16T16:46:46Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2012-11-16T16:46:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b27a988127fda1856eddfcec63c801091efb5aec'/>
<id>urn:sha1:b27a988127fda1856eddfcec63c801091efb5aec</id>
<content type='text'>
Commit ff03261adc8b4bdd8291f1783c079b53a892b429 ('Bluetooth: Fix
sending a HCI Authorization Request over LE links', commit
d8343f125710fb596f7a88cd756679f14f4e77b9 upstream) added an
call to smp_conn_security() from hci_conn_security().  The
former is only defined if CONFIG_BT_L2CAP=y.

This is not required in mainline since commit
f1e91e1640d808d332498a6b09b2bcd01462eff9 ('Bluetooth: Always compile
SCO and L2CAP in Bluetooth Core') removed that option.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: SMP: Fix setting unknown auth_req bits</title>
<updated>2012-10-30T23:26:43Z</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2012-10-11T14:26:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2ce7b03705f186f899e45b7d6b9a657c2138ac8c'/>
<id>urn:sha1:2ce7b03705f186f899e45b7d6b9a657c2138ac8c</id>
<content type='text'>
commit 065a13e2cc665f6547dc7e8a9d6b6565badf940a upstream.

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;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix sending a HCI Authorization Request over LE links</title>
<updated>2012-10-10T02:31:12Z</updated>
<author>
<name>Vinicius Costa Gomes</name>
<email>vinicius.gomes@openbossa.org</email>
</author>
<published>2012-08-24T00:32:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ff03261adc8b4bdd8291f1783c079b53a892b429'/>
<id>urn:sha1:ff03261adc8b4bdd8291f1783c079b53a892b429</id>
<content type='text'>
commit d8343f125710fb596f7a88cd756679f14f4e77b9 upstream.

In the case that the link is already in the connected state and a
Pairing request arrives from the mgmt interface, hci_conn_security()
would be called but it was not considering LE links.

Reported-by: João Paulo Rechi Vita &lt;jprvita@openbossa.org&gt;
Signed-off-by: Vinicius Costa Gomes &lt;vinicius.gomes@openbossa.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Change signature of smp_conn_security()</title>
<updated>2012-10-10T02:31:11Z</updated>
<author>
<name>Vinicius Costa Gomes</name>
<email>vinicius.gomes@openbossa.org</email>
</author>
<published>2012-08-24T00:32:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6e792a90dee712edbbdf20f102c76bb9b8e36598'/>
<id>urn:sha1:6e792a90dee712edbbdf20f102c76bb9b8e36598</id>
<content type='text'>
commit cc110922da7e902b62d18641a370fec01a9fa794 upstream.

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;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: L2CAP - Fix info leak via getsockname()</title>
<updated>2012-09-19T14:04:53Z</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2012-08-15T11:31:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=79690021eba0738861965187af2f75035f846d6f'/>
<id>urn:sha1:79690021eba0738861965187af2f75035f846d6f</id>
<content type='text'>
[ Upstream commit 792039c73cf176c8e39a6e8beef2c94ff46522ed ]

The L2CAP code fails to initialize the l2_bdaddr_type member of struct
sockaddr_l2 and the padding byte added for alignment. It that for leaks
two bytes kernel stack via the getsockname() syscall. Add an explicit
memset(0) before filling the structure to avoid the info leak.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Cc: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: Johan Hedberg &lt;johan.hedberg@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: RFCOMM - Fix info leak via getsockname()</title>
<updated>2012-09-19T14:04:52Z</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2012-08-15T11:31:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=18fc748c13b0a15152bd711c3d42560f833af9e5'/>
<id>urn:sha1:18fc748c13b0a15152bd711c3d42560f833af9e5</id>
<content type='text'>
[ Upstream commit 9344a972961d1a6d2c04d9008b13617bcb6ec2ef ]

The RFCOMM code fails to initialize the trailing padding byte of struct
sockaddr_rc added for alignment. It that for leaks one byte kernel stack
via the getsockname() syscall. Add an explicit memset(0) before filling
the structure to avoid the info leak.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Cc: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: Johan Hedberg &lt;johan.hedberg@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
</feed>
