<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/bluetooth/l2cap_core.c, branch linux-3.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-10-02T17:39:47Z</updated>
<entry>
<title>Bluetooth: Change signature of smp_conn_security()</title>
<updated>2012-10-02T17:39:47Z</updated>
<author>
<name>Vinicius Costa Gomes</name>
</author>
<published>2012-08-24T00:32:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=257f3932617fa8019b779f6fa0d327c50885ff8a'/>
<id>urn:sha1:257f3932617fa8019b779f6fa0d327c50885ff8a</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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Bluetooth: Fix legacy pairing with some devices</title>
<updated>2012-09-14T16:59:26Z</updated>
<author>
<name>Szymon Janc</name>
</author>
<published>2012-07-19T12:46:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=78f47208c3d7022ec632764406161504386e8266'/>
<id>urn:sha1:78f47208c3d7022ec632764406161504386e8266</id>
<content type='text'>
commit a9ea3ed9b71cc3271dd59e76f65748adcaa76422 upstream.

Some devices e.g. some Android based phones don't do SDP search before
pairing and cancel legacy pairing when ACL is disconnected.

PIN Code Request event which changes ACL timeout to HCI_PAIRING_TIMEOUT
is only received after remote user entered PIN.

In that case no L2CAP is connected so default HCI_DISCONN_TIMEOUT
(2 seconds) is being used to timeout ACL connection. This results in
problems with legacy pairing as remote user has only few seconds to
enter PIN before ACL is disconnected.

Increase disconnect timeout for incomming connection to
HCI_PAIRING_TIMEOUT if SSP is disabled and no linkey exists.

To avoid keeping ACL alive for too long after SDP search set ACL
timeout back to HCI_DISCONN_TIMEOUT when L2CAP is connected.

2012-07-19 13:24:43.413521 &lt; HCI Command: Create Connection (0x01|0x0005) plen 13
    bdaddr 00:02:72:D6:6A:3F ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5
2012-07-19 13:24:43.425224 &gt; HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
2012-07-19 13:24:43.885222 &gt; HCI Event: Role Change (0x12) plen 8
    status 0x00 bdaddr 00:02:72:D6:6A:3F role 0x01
    Role: Slave
2012-07-19 13:24:44.054221 &gt; HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 42 bdaddr 00:02:72:D6:6A:3F type ACL encrypt 0x00
2012-07-19 13:24:44.054313 &lt; HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
    handle 42
2012-07-19 13:24:44.055176 &gt; HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
    bdaddr 00:02:72:D6:6A:3F mode 0
2012-07-19 13:24:44.056217 &gt; HCI Event: Max Slots Change (0x1b) plen 3
    handle 42 slots 5
2012-07-19 13:24:44.059218 &gt; HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
2012-07-19 13:24:44.062192 &gt; HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
2012-07-19 13:24:44.067219 &gt; HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 42
    Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
2012-07-19 13:24:44.067248 &lt; HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
    handle 42 page 1
2012-07-19 13:24:44.071217 &gt; HCI Event: Command Status (0x0f) plen 4
    Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
2012-07-19 13:24:44.076218 &gt; HCI Event: Read Remote Extended Features (0x23) plen 13
    status 0x00 handle 42 page 1 max 1
    Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
2012-07-19 13:24:44.076249 &lt; HCI Command: Remote Name Request (0x01|0x0019) plen 10
    bdaddr 00:02:72:D6:6A:3F mode 2 clkoffset 0x0000
2012-07-19 13:24:44.081218 &gt; HCI Event: Command Status (0x0f) plen 4
    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
2012-07-19 13:24:44.105214 &gt; HCI Event: Remote Name Req Complete (0x07) plen 255
    status 0x00 bdaddr 00:02:72:D6:6A:3F name 'uw000951-0'
2012-07-19 13:24:44.105284 &lt; HCI Command: Authentication Requested (0x01|0x0011) plen 2
    handle 42
2012-07-19 13:24:44.111207 &gt; HCI Event: Command Status (0x0f) plen 4
    Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
2012-07-19 13:24:44.112220 &gt; HCI Event: Link Key Request (0x17) plen 6
    bdaddr 00:02:72:D6:6A:3F
2012-07-19 13:24:44.112249 &lt; HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
    bdaddr 00:02:72:D6:6A:3F
2012-07-19 13:24:44.115215 &gt; HCI Event: Command Complete (0x0e) plen 10
    Link Key Request Negative Reply (0x01|0x000c) ncmd 1
    status 0x00 bdaddr 00:02:72:D6:6A:3F
2012-07-19 13:24:44.116215 &gt; HCI Event: PIN Code Request (0x16) plen 6
    bdaddr 00:02:72:D6:6A:3F
2012-07-19 13:24:48.099184 &gt; HCI Event: Auth Complete (0x06) plen 3
    status 0x13 handle 42
    Error: Remote User Terminated Connection
2012-07-19 13:24:48.179182 &gt; HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 42 reason 0x13
    Reason: Remote User Terminated Connection

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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Bluetooth: Fix using uninitialized option in RFCMode</title>
<updated>2012-06-12T02:50:28Z</updated>
<author>
<name>Szymon Janc</name>
</author>
<published>2012-06-08T09:33:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8f321f853ea33330c7141977cd34804476e2e07e'/>
<id>urn:sha1:8f321f853ea33330c7141977cd34804476e2e07e</id>
<content type='text'>
If remote device sends bogus RFC option with invalid length,
undefined options values are used. Fix this by using defaults when
remote misbehaves.

This also fixes the following warning reported by gcc 4.7.0:

net/bluetooth/l2cap_core.c: In function 'l2cap_config_rsp':
net/bluetooth/l2cap_core.c:3302:13: warning: 'rfc.max_pdu_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.max_pdu_size' was declared here
net/bluetooth/l2cap_core.c:3298:25: warning: 'rfc.monitor_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.monitor_timeout' was declared here
net/bluetooth/l2cap_core.c:3297:25: warning: 'rfc.retrans_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.retrans_timeout' was declared here
net/bluetooth/l2cap_core.c:3295:2: warning: 'rfc.mode' may be used uninitialized in this function [-Wmaybe-uninitialized]
net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.mode' was declared here

Signed-off-by: Szymon Janc &lt;szymon.janc@tieto.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix deadlock and crash when SMP pairing times out</title>
<updated>2012-06-08T06:23:56Z</updated>
<author>
<name>Johan Hedberg</name>
</author>
<published>2012-06-06T10:44:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d06cc416f517a25713dedd9e2a9ccf4f3086c09a'/>
<id>urn:sha1:d06cc416f517a25713dedd9e2a9ccf4f3086c09a</id>
<content type='text'>
The l2cap_conn_del function tries to cancel_sync the security timer, but
when it's called from the timeout function itself a deadlock occurs.
Subsequently the "hcon-&gt;l2cap_data = NULL" that's supposed to protect
multiple calls to l2cap_conn_del never gets cleared and when the
connection finally drops we double free's etc which will crash the
kernel.

This patch fixes the issue by using the HCI_CONN_LE_SMP_PEND for
protecting against this. The same flag is also used for the same purpose
in other places in the SMP code.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Create flags for bt_sk()</title>
<updated>2012-05-16T19:14:17Z</updated>
<author>
<name>Gustavo Padovan</name>
</author>
<published>2012-05-16T15:17:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c5daa683f2d3315cd766f550ef7d88bfca1671f4'/>
<id>urn:sha1:c5daa683f2d3315cd766f550ef7d88bfca1671f4</id>
<content type='text'>
defer_setup and suspended are now flags into bt_sk().

Signed-off-by: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Restore locking semantics when looking up L2CAP channels</title>
<updated>2012-05-16T19:13:51Z</updated>
<author>
<name>Mat Martineau</name>
</author>
<published>2012-05-02T16:42:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ef191aded58c5e6860b01f463818584a420a4d6b'/>
<id>urn:sha1:ef191aded58c5e6860b01f463818584a420a4d6b</id>
<content type='text'>
As the comment for l2cap_get_chan_by_scid indicated, the function used
to return a locked socket.  The lock for the socket was acquired while
the channel list was also locked.

When locking was moved over to the l2cap_chan structure, the channel
lock was no longer acquired with the channel list still locked.  This
made it possible for the l2cap_chan to be deleted after
conn-&gt;chan_lock was released but before l2cap_chan_lock was called.
Making the call to l2cap_chan_lock before releasing conn-&gt;chan_lock
makes it impossible for the l2cap_chan to be deleted at the wrong
time.

Signed-off-by: Mat Martineau &lt;mathewm@codeaurora.org&gt;
Reviewed-by: Ulisses Furquim &lt;ulisses@profusion.mobi&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo@padovan.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix a redundant and problematic incoming MTU check</title>
<updated>2012-05-16T19:13:37Z</updated>
<author>
<name>Mat Martineau</name>
</author>
<published>2012-05-02T16:41:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=35c84d76ee52f49fe2635d8cd686b5b658e8d892'/>
<id>urn:sha1:35c84d76ee52f49fe2635d8cd686b5b658e8d892</id>
<content type='text'>
The L2CAP MTU for incoming data is verified differently depending on
the L2CAP mode, so the check is best performed in a mode-specific
context.  Checking the incoming MTU before HCI fragment reassembly is
a layer violation and assumes all bytes after the standard L2CAP
header are L2CAP data.

This approach causes issues with unsegmented ERTM or streaming mode
frames, where there are additional enhanced or extended headers before
the data payload and possible FCS bytes after the data payload.  A
valid frame could be as many as 10 bytes larger than the MTU.

Removing this code is the best fix, because the MTU is checked later
on for all L2CAP data frames (connectionless, basic, ERTM, and
streaming).  This also gets rid of outdated locking (socket instead of
l2cap_chan) and an extra lookup of the channel ID.

Signed-off-by: Mat Martineau &lt;mathewm@codeaurora.org&gt;
Reviewed-by: Ulisses Furquim &lt;ulisses@profusion.mobi&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo@padovan.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: improve readability of l2cap_seq_list code</title>
<updated>2012-05-16T19:13:06Z</updated>
<author>
<name>Gustavo Padovan</name>
</author>
<published>2012-05-09T21:28:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f522ae363d5f20de172ea6f9973ba4cc44801f2b'/>
<id>urn:sha1:f522ae363d5f20de172ea6f9973ba4cc44801f2b</id>
<content type='text'>
Removes one indentation level.

Signed-off-by: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix skb length calculation</title>
<updated>2012-05-16T19:12:56Z</updated>
<author>
<name>Gustavo Padovan</name>
</author>
<published>2012-05-11T16:16:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d0ed3d5879edae4bf1c98eb3163466c30d41789'/>
<id>urn:sha1:2d0ed3d5879edae4bf1c98eb3163466c30d41789</id>
<content type='text'>
When we add a fragment to a skb, len and data_len fields need to be
updated.

Signed-off-by: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix wrong set of skb fragments</title>
<updated>2012-05-16T19:12:32Z</updated>
<author>
<name>Gustavo Padovan</name>
</author>
<published>2012-05-15T16:22:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fbe0070092c3968927c63ab56c00b47c6aa3770f'/>
<id>urn:sha1:fbe0070092c3968927c63ab56c00b47c6aa3770f</id>
<content type='text'>
If alloc() fails we let the frags linked list with garbage value (the
err ptr value) in its last element.

Reported-by: Mat Martineau &lt;mathewm@codeaurora.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
</feed>
