You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@mynewt.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/07/07 18:13:00 UTC

[jira] [Commented] (MYNEWT-749) BLE Host - Crash during key persistence if key-dist settings are 0

    [ https://issues.apache.org/jira/browse/MYNEWT-749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16078478#comment-16078478 ] 

ASF subversion and git services commented on MYNEWT-749:
--------------------------------------------------------

Commit e3bc451f80adbaaa50d6851effa7ff6bafbb19d2 in mynewt-core's branch refs/heads/master from [~ccollins476]
[ https://gitbox.apache.org/repos/asf?p=mynewt-core.git;h=e3bc451 ]

MYNEWT-749 BLE Host - Don't persist if keydist==0

In legacy mode, if either peer indicates a key distribution flags value
of 0, then don't persist security material when pairing completes.

It isn't clear from the spec what should happen when both peers indicate
bonding support, but one indicates a 0 key distribution field.  I think
proceding with pairing and just not persisting makes the most sense.
This is also what Lightblue (or CoreBluetooth, I guess) seems to do.


> BLE Host - Crash during key persistence if key-dist settings are 0
> ------------------------------------------------------------------
>
>                 Key: MYNEWT-749
>                 URL: https://issues.apache.org/jira/browse/MYNEWT-749
>             Project: Mynewt
>          Issue Type: Bug
>      Security Level: Public(Viewable by anyone) 
>          Components: Nimble
>            Reporter: Christopher Collins
>            Assignee: Christopher Collins
>             Fix For: v1_1_0_rel
>
>
> (Pull request: https://github.com/apache/mynewt-core/pull/370)
> If BLE_SM_BONDING is enabled, but one of the the following settings is 0:
> * BLE_SM_OUR_KEY_DIST
> * BLE_SM_THEIR_KEY_DIST
> then Mynewt crashes when pairing completes.  Here is an example stack trace:
> {noformat}
> Program received signal SIGTRAP, Trace/breakpoint trap.
> __assert_func (file=file@entry=0x0, line=line@entry=0, func=func@entry=0x0, e=e@entry=0x0) at kernel/os/src/arch/cortex_m4/os_fault.c:137
> 137            asm("bkpt");
> (gdb) whe
> #0  __assert_func (file=file@entry=0x0, line=line@entry=0, func=func@entry=0x0, e=e@entry=0x0) at kernel/os/src/arch/cortex_m4/os_fault.c:137
> #1  0x000181f8 in ble_store_persist_sec (obj_type=<optimized out>, value_sec=<optimized out>) at net/nimble/host/src/ble_store.c:92
> #2  0x000177ca in ble_sm_persist_keys (proc=0x181f9 <ble_store_persist_sec+20>) at net/nimble/host/src/ble_sm.c:565
> #3  ble_sm_process_result (conn_handle=conn_handle@entry=1, res=res@entry=0x2000165c <os_main_stack+3968>) at net/nimble/host/src/ble_sm.c:860
> #4  0x0001792c in ble_sm_enc_event_rx (conn_handle=<optimized out>, evt_status=<optimized out>, encrypted=1) at net/nimble/host/src/ble_sm.c:1042
> #5  0x00017942 in ble_sm_enc_change_rx (evt=evt@entry=0x20001698 <os_main_stack+4028>) at net/nimble/host/src/ble_sm.c:1051
> #6  0x000153be in ble_hs_hci_evt_encrypt_change (event_code=<optimized out>, data=0x20004c20 "\b\004", len=<optimized out>) at net/nimble/host/src/ble_hs_hci_evt.c:163
> #7  0x00015438 in ble_hs_hci_evt_process (data=0x20004c20 "\b\004") at net/nimble/host/src/ble_hs_hci_evt.c:593
> #8  0x00009016 in os_eventq_run (evq=<optimized out>) at kernel/os/src/os_eventq.c:172
> #9  0x0000879e in main () at apps/bleprph/src/main.c:301
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)