Bluetooth: Fix initial RFCOMM DLC security level
Subsystems (2)
PATCH 1/1 Bluetooth: Fix initial RFCOMM DLC security level
From: Johan Hedberg <[email protected]>
Due to commit 63ce0900 connections initiated through TTYs created with "rfcomm bind ..." would have security level BT_SECURITY_SDP instead of BT_SECURITY_LOW. This would cause instant connection failure between any two SSP capable devices due to the L2CAP connect request to RFCOMM being sent before authentication has been performed. This patch fixes the regression by always initializing the DLC security level to BT_SECURITY_LOW.
--- net/bluetooth/rfcomm/core.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
net/bluetooth/rfcomm/core.c +1 -0
@@ -311,6 +311,7 @@ static void rfcomm_dlc_clear_state(struct rfcomm_dlc *d) d->state =BT_OPEN ; d->flags =0 ; d->mscex =0 ; + d->sec_level =BT_SECURITY_LOW ; d->mtu =RFCOMM_DEFAULT_MTU ; d->v24_sig =RFCOMM_V24_RTC |RFCOMM_V24_RTR |RFCOMM_V24_DV ;
Signature · 1 line
1.7.1
Hi,
Quoted 20 lines · On Mon, Dec 6, 2010 at 3:56 PM, <[email protected]> wrote:
From: Johan Hedberg <[email protected]>
Due to commit
63ce0900connections initiated through TTYs created with "rfcomm bind ..." would have security levelBT_SECURITY_SDPinstead ofBT_SECURITY_LOW. This would cause instant connection failure between any two SSP capable devices due to the L2CAP connect request to RFCOMM being sent before authentication has been performed. This patch fixes the regression by always initializing the DLC security level toBT_SECURITY_LOW.Signed-off-by Johan Hedberg <[email protected]>---
net/bluetooth/rfcomm/core.c | 1 +1 files changed, 1 insertions(+), 0 deletions(-)net/bluetooth/rfcomm/core.c +0
-0
net/bluetooth/rfcomm/core.c static void rfcomm_dlc_clear_state(struct rfcomm_dlc *d) · line 317
Quoted 7 lines
net/bluetooth/rfcomm/core.c +1
-0@@ -311,6 +311,7 @@ static void rfcomm_dlc_clear_state(struct rfcomm_dlc *d) d->state = BT_OPEN; d->flags = 0; d->mscex = 0; + d->sec_level = BT_SECURITY_LOW; d->mtu = RFCOMM_DEFAULT_MTU; d->v24_sig = RFCOMM_V24_RTC | RFCOMM_V24_RTR | RFCOMM_V24_DV;
Nice catch, I completely forgot to check if tty initialize sec_level with anything.
Signature · 2 lines
Luiz Augusto von Dentz Computer Engineer
Hi Johan,
Quoted 11 lines · * [email protected] <[email protected]> [2010-12-06 15:56:17 +0200]:
From: Johan Hedberg <[email protected]>
Due to commit
63ce0900connections initiated through TTYs created with "rfcomm bind ..." would have security levelBT_SECURITY_SDPinstead ofBT_SECURITY_LOW. This would cause instant connection failure between any two SSP capable devices due to the L2CAP connect request to RFCOMM being sent before authentication has been performed. This patch fixes the regression by always initializing the DLC security level toBT_SECURITY_LOW.Signed-off-by Johan Hedberg <[email protected]>
Patch has been applied to bluetooth-2.6, thanks.
Signature · 2 lines
Gustavo F. Padovan http://profusion.mobi