-
Notifications
You must be signed in to change notification settings - Fork 333
Description
Hello.
L2CAP/LE/CFC/BV-25-C is FAIL and I would like to share the findings.
This test case requires the LE Credit Based Connection RSP to respond with 0x0008 (insufficient encryption).
I tried various things but I got either 0x0005 (insufficient authentication) or 0x0000 (Connection Success), so I investigated.
My conclusion is that there is no case in which the Linux kernel implementation responds with 0x0008 (insufficient encryption).
The response definition is here.
https://github.com/torvalds/linux/blob/master/include/net/bluetooth/l2cap.h#L278
#define L2CAP_CR_LE_AUTHENTICATION 0x0005
#define L2CAP_CR_LE_AUTHORIZATION 0x0006
#define L2CAP_CR_LE_BAD_KEY_SIZE 0x0007
#define L2CAP_CR_LE_ENCRYPTION 0x0008
This is where the security check is carried out to determine the LE Credit Based Connection RSP.
https://github.com/torvalds/linux/blob/master/net/bluetooth/l2cap_core.c#4870
l2cap_le_connect_req()
if (!smp_sufficient_security(conn->hcon, pchan->sec_level,
SMP_ALLOW_STK)) {
result = L2CAP_CR_LE_AUTHENTICATION;
chan = NULL;
goto response_unlock;
}
Looking here, there is confirmation that it will respond with 0x0005, but there is no implementation that will respond with 0x0008.
I'm going to review my ICS settings and try to avoid the test.
I hope this helps someone.