[PATCH] Bluetooth: Check inquiry status before sending one

2021-03-31 Thread Archie Pusaka
From: Archie Pusaka There is a possibility where HCI_INQUIRY flag is set but we still send HCI_OP_INQUIRY anyway. Such a case can be reproduced by connecting to an LE device while active scanning. When the device is discovered, we initiate a connection, stop LE Scan, and send Discovery MGMT

Re: [PATCH] Bluetooth: check for zapped sk before connecting

2021-03-23 Thread Archie Pusaka
h/l2cap_core.c:598 > > l2cap_chan_close+0x537/0x5dd net/bluetooth/l2cap_core.c:756 > > l2cap_chan_timeout+0x104/0x17e net/bluetooth/l2cap_core.c:429 > > process_one_work+0x7e3/0xcb0 kernel/workqueue.c:2064 > > worker_thread+0x5a5/0x773 kernel/workqueue.c:2196 > > kthread+

[PATCH v2] Bluetooth: check for zapped sk before connecting

2021-03-23 Thread Archie Pusaka
From: Archie Pusaka There is a possibility of receiving a zapped sock on l2cap_sock_connect(). This could lead to interesting crashes, one such case is tearing down an already tore l2cap_sock as is happened with this call trace: __dump_stack lib/dump_stack.c:15 [inline] dump_stack+0xc4/0x118

[PATCH] Bluetooth: verify AMP hci_chan before amp_destroy

2021-03-22 Thread Archie Pusaka
From: Archie Pusaka hci_chan can be created in 2 places: hci_loglink_complete_evt() if it is an AMP hci_chan, or l2cap_conn_add() otherwise. In theory, Only AMP hci_chan should be removed by a call to hci_disconn_loglink_complete_evt(). However, the controller might mess up, call that function

[PATCH] Bluetooth: Set CONF_NOT_COMPLETE as l2cap_chan default

2021-03-22 Thread Archie Pusaka
From: Archie Pusaka Currently l2cap_chan_set_defaults() reset chan->conf_state to zero. However, there is a flag CONF_NOT_COMPLETE which is set when creating the l2cap_chan. It is suggested that the flag should be cleared when l2cap_chan is ready, but when l2cap_chan_set_defaults() is cal

[PATCH] Bluetooth: check for zapped sk before connecting

2021-03-22 Thread Archie Pusaka
From: Archie Pusaka There is a possibility of receiving a zapped sock on l2cap_sock_connect(). This could lead to interesting crashes, one such case is tearing down an already tore l2cap_sock as is happened with this call trace: __dump_stack lib/dump_stack.c:15 [inline] dump_stack+0xc4/0x118

[PATCH v6 0/7] MSFT offloading support for advertisement monitor

2021-01-22 Thread Archie Pusaka
From: Archie Pusaka Hi linux-bluetooth, This series of patches manages the hardware offloading part of MSFT extension API. The full documentation can be accessed by this link: https://docs.microsoft.com/en-us/windows-hardware/drivers/bluetooth/microsoft-defined-bluetooth-hci-commands

[PATCH v6 3/7] Bluetooth: advmon offload MSFT remove monitor

2021-01-22 Thread Archie Pusaka
From: Archie Pusaka Implements the monitor removal functionality for advertising monitor offloading to MSFT controllers. Supply handle = 0 to remove all monitors. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Reviewed-by: Yun-Hao Chung Reported-by: kernel test robot Reported

[PATCH v6 2/7] Bluetooth: advmon offload MSFT add monitor

2021-01-22 Thread Archie Pusaka
From: Archie Pusaka Enables advertising monitor offloading to the controller, if MSFT extension is supported. The kernel won't adjust the monitor parameters to match what the controller supports - that is the user space's responsibility. This patch only manages the addition of monitors. Monitor

[PATCH v6 1/7] Bluetooth: advmon offload MSFT add rssi support

2021-01-22 Thread Archie Pusaka
From: Archie Pusaka MSFT needs rssi parameter for monitoring advertisement packet, therefore we should supply them from mgmt. This adds a new opcode to add advertisement monitor with rssi parameters. Signed-off-by: Archie Pusaka Reviewed-by: Manish Mandlik Reviewed-by: Miao-chen Chou

[PATCH v6 6/7] Bluetooth: advmon offload MSFT interleave scanning integration

2021-01-22 Thread Archie Pusaka
From: Archie Pusaka When MSFT extension is supported, we don't have to interleave the scan as we could just do allowlist scan. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou --- Changes in v6: * New patch "advmon offload MSFT interleave scanning integration" net

[PATCH v6 7/7] Bluetooth: disable advertisement filters during suspend

2021-01-22 Thread Archie Pusaka
From: Howard Chung This adds logic to disable and reenable advertisement filters during suspend and resume. After this patch, we would only receive packets from devices in allow list during suspend. Signed-off-by: Howard Chung Reviewed-by: Abhishek Pandit-Subedi --- Changes in v6: * New

[PATCH v6 5/7] Bluetooth: advmon offload MSFT handle filter enablement

2021-01-22 Thread Archie Pusaka
From: Archie Pusaka Implements the feature to disable/enable the filter used for advertising monitor on MSFT controller, effectively have the same effect as "remove all monitors" and "add all previously removed monitors". This feature would be needed when suspending, whe

[PATCH v6 4/7] Bluetooth: advmon offload MSFT handle controller reset

2021-01-22 Thread Archie Pusaka
From: Archie Pusaka When the controller is powered off, the registered advertising monitor is removed from the controller. This patch handles the re-registration of those monitors when the power is on. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Reviewed-by: Yun-Hao Chung

Re: [PATCH v5 0/5] MSFT offloading support for advertisement monitor

2021-01-12 Thread Archie Pusaka
Hi maintainers, Gentle ping to review this patch, thanks~! Regards, Archie On Tue, 22 Dec 2020 at 18:26, Archie Pusaka wrote: > > From: Archie Pusaka > > > Hi linux-bluetooth, > > This series of patches manages the hardware offloading part of MSFT > extension API. Th

Re: [PATCH v3 4/5] Bluetooth: advmon offload MSFT handle controller reset

2020-12-22 Thread Archie Pusaka
roller. This patch handles the re-registration > >>> of those monitors when the power is on. > >>> > >>> Signed-off-by: Archie Pusaka > >>> Reviewed-by: Miao-chen Chou > >>> Reviewed-by: Yun-Hao C

[PATCH v5 5/5] Bluetooth: advmon offload MSFT handle filter enablement

2020-12-22 Thread Archie Pusaka
From: Archie Pusaka Implements the feature to disable/enable the filter used for advertising monitor on MSFT controller, effectively have the same effect as "remove all monitors" and "add all previously removed monitors". This feature would be needed when suspending, whe

[PATCH v5 4/5] Bluetooth: advmon offload MSFT handle controller reset

2020-12-22 Thread Archie Pusaka
From: Archie Pusaka When the controller is powered off, the registered advertising monitor is removed from the controller. This patch handles the re-registration of those monitors when the power is on. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Reviewed-by: Yun-Hao Chung

[PATCH v5 2/5] Bluetooth: advmon offload MSFT add monitor

2020-12-22 Thread Archie Pusaka
From: Archie Pusaka Enables advertising monitor offloading to the controller, if MSFT extension is supported. The kernel won't adjust the monitor parameters to match what the controller supports - that is the user space's responsibility. This patch only manages the addition of monitors. Monitor

[PATCH v5 3/5] Bluetooth: advmon offload MSFT remove monitor

2020-12-22 Thread Archie Pusaka
From: Archie Pusaka Implements the monitor removal functionality for advertising monitor offloading to MSFT controllers. Supply handle = 0 to remove all monitors. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Reviewed-by: Yun-Hao Chung Reported-by: kernel test robot Reported

[PATCH v5 0/5] MSFT offloading support for advertisement monitor

2020-12-22 Thread Archie Pusaka
From: Archie Pusaka Hi linux-bluetooth, This series of patches manages the hardware offloading part of MSFT extension API. The full documentation can be accessed by this link: https://docs.microsoft.com/en-us/windows-hardware/drivers/bluetooth/microsoft-defined-bluetooth-hci-commands

[PATCH v5 1/5] Bluetooth: advmon offload MSFT add rssi support

2020-12-22 Thread Archie Pusaka
From: Archie Pusaka MSFT needs rssi parameter for monitoring advertisement packet, therefore we should supply them from mgmt. This adds a new opcode to add advertisement monitor with rssi parameters. Signed-off-by: Archie Pusaka Reviewed-by: Manish Mandlik Reviewed-by: Miao-chen Chou

[PATCH v4 5/5] Bluetooth: advmon offload MSFT handle filter enablement

2020-12-22 Thread Archie Pusaka
From: Archie Pusaka Implements the feature to disable/enable the filter used for advertising monitor on MSFT controller, effectively have the same effect as "remove all monitors" and "add all previously removed monitors". This feature would be needed when suspending, whe

[PATCH v4 4/5] Bluetooth: advmon offload MSFT handle controller reset

2020-12-22 Thread Archie Pusaka
From: Archie Pusaka When the controller is powered off, the registered advertising monitor is removed from the controller. This patch handles the re-registration of those monitors when the power is on. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Reviewed-by: Yun-Hao Chung

[PATCH v4 3/5] Bluetooth: advmon offload MSFT remove monitor

2020-12-22 Thread Archie Pusaka
From: Archie Pusaka Implements the monitor removal functionality for advertising monitor offloading to MSFT controllers. Supply handle = 0 to remove all monitors. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Reviewed-by: Yun-Hao Chung Reported-by: kernel test robot Reported

[PATCH v4 1/5] Bluetooth: advmon offload MSFT add rssi support

2020-12-22 Thread Archie Pusaka
From: Archie Pusaka MSFT needs rssi parameter for monitoring advertisement packet, therefore we should supply them from mgmt. This adds a new opcode to add advertisement monitor with rssi parameters. Signed-off-by: Archie Pusaka Reviewed-by: Manish Mandlik Reviewed-by: Miao-chen Chou

[PATCH v4 2/5] Bluetooth: advmon offload MSFT add monitor

2020-12-22 Thread Archie Pusaka
From: Archie Pusaka Enables advertising monitor offloading to the controller, if MSFT extension is supported. The kernel won't adjust the monitor parameters to match what the controller supports - that is the user space's responsibility. This patch only manages the addition of monitors. Monitor

[PATCH v4 0/5] MSFT offloading support for advertisement monitor

2020-12-22 Thread Archie Pusaka
From: Archie Pusaka Hi linux-bluetooth, This series of patches manages the hardware offloading part of MSFT extension API. The full documentation can be accessed by this link: https://docs.microsoft.com/en-us/windows-hardware/drivers/bluetooth/microsoft-defined-bluetooth-hci-commands

Re: [PATCH v3 4/5] Bluetooth: advmon offload MSFT handle controller reset

2020-12-21 Thread Archie Pusaka
r is on. > > > > Signed-off-by: Archie Pusaka > > Reviewed-by: Miao-chen Chou > > Reviewed-by: Yun-Hao Chung > > > > --- > > > > (no changes since v1) > > > > net/bluetooth/msft.c | 79 +--- > >

[PATCH v3 3/5] Bluetooth: advmon offload MSFT remove monitor

2020-12-15 Thread Archie Pusaka
From: Archie Pusaka Implements the monitor removal functionality for advertising monitor offloading to MSFT controllers. Supply handle = 0 to remove all monitors. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Reviewed-by: Yun-Hao Chung Reported-by: kernel test robot Reported

[PATCH v3 5/5] Bluetooth: advmon offload MSFT handle filter enablement

2020-12-15 Thread Archie Pusaka
From: Archie Pusaka Implements the feature to disable/enable the filter used for advertising monitor on MSFT controller, effectively have the same effect as "remove all monitors" and "add all previously removed monitors". This feature would be needed when suspending, whe

[PATCH v3 2/5] Bluetooth: advmon offload MSFT add monitor

2020-12-15 Thread Archie Pusaka
From: Archie Pusaka Enables advertising monitor offloading to the controller, if MSFT extension is supported. The kernel won't adjust the monitor parameters to match what the controller supports - that is the user space's responsibility. This patch only manages the addition of monitors. Monitor

[PATCH v3 4/5] Bluetooth: advmon offload MSFT handle controller reset

2020-12-15 Thread Archie Pusaka
From: Archie Pusaka When the controller is powered off, the registered advertising monitor is removed from the controller. This patch handles the re-registration of those monitors when the power is on. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Reviewed-by: Yun-Hao Chung

[PATCH v3 1/5] Bluetooth: advmon offload MSFT add rssi support

2020-12-15 Thread Archie Pusaka
From: Archie Pusaka MSFT needs rssi parameter for monitoring advertisement packet, therefore we should supply them from mgmt. This adds a new opcode to add advertisement monitor with rssi parameters. Signed-off-by: Archie Pusaka Reviewed-by: Manish Mandlik Reviewed-by: Miao-chen Chou

[PATCH v3 0/5] MSFT offloading support for advertisement monitor

2020-12-15 Thread Archie Pusaka
From: Archie Pusaka Hi linux-bluetooth, This series of patches manages the hardware offloading part of MSFT extension API. The full documentation can be accessed by this link: https://docs.microsoft.com/en-us/windows-hardware/drivers/bluetooth/microsoft-defined-bluetooth-hci-commands

Re: [PATCH v2 3/5] Bluetooth: advmon offload MSFT remove monitor

2020-12-15 Thread Archie Pusaka
Hi Dan, On Wed, 16 Dec 2020 at 03:06, Dan Carpenter wrote: > > Hi Archie, > > url: > https://github.com/0day-ci/linux/commits/Archie-Pusaka/MSFT-offloading-support-for-advertisement-monitor/20201215-163858 > base: > https://git.kernel.org/pub/scm/linux/kernel/gi

[PATCH v2 2/5] Bluetooth: advmon offload MSFT add monitor

2020-12-15 Thread Archie Pusaka
From: Archie Pusaka Enables advertising monitor offloading to the controller, if MSFT extension is supported. The kernel won't adjust the monitor parameters to match what the controller supports - that is the user space's responsibility. This patch only manages the addition of monitors. Monitor

[PATCH v2 4/5] Bluetooth: advmon offload MSFT handle controller reset

2020-12-15 Thread Archie Pusaka
From: Archie Pusaka When the controller is powered off, the registered advertising monitor is removed from the controller. This patch handles the re-registration of those monitors when the power is on. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Reviewed-by: Yun-Hao Chung

[PATCH v2 5/5] Bluetooth: advmon offload MSFT handle filter enablement

2020-12-15 Thread Archie Pusaka
From: Archie Pusaka Implements the feature to disable/enable the filter used for advertising monitor on MSFT controller, effectively have the same effect as "remove all monitors" and "add all previously removed monitors". This feature would be needed when suspending, whe

[PATCH v2 3/5] Bluetooth: advmon offload MSFT remove monitor

2020-12-15 Thread Archie Pusaka
From: Archie Pusaka Implements the monitor removal functionality for advertising monitor offloading to MSFT controllers. Supply handle = 0 to remove all monitors. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Reviewed-by: Yun-Hao Chung --- (no changes since v1) include/net

[PATCH v2 1/5] Bluetooth: advmon offload MSFT add rssi support

2020-12-15 Thread Archie Pusaka
From: Archie Pusaka MSFT needs rssi parameter for monitoring advertisement packet, therefore we should supply them from mgmt. This adds a new opcode to add advertisement monitor with rssi parameters. Signed-off-by: Archie Pusaka Reviewed-by: Manish Mandlik Reviewed-by: Miao-chen Chou

[PATCH v2 0/5] MSFT offloading support for advertisement monitor

2020-12-15 Thread Archie Pusaka
From: Archie Pusaka Hi linux-bluetooth, This series of patches manages the hardware offloading part of MSFT extension API. The full documentation can be accessed by this link: https://docs.microsoft.com/en-us/windows-hardware/drivers/bluetooth/microsoft-defined-bluetooth-hci-commands

Re: [PATCH v1 1/5] Bluetooth: advmon offload MSFT add rssi support

2020-12-07 Thread Archie Pusaka
Hi Marcel, On Mon, 7 Dec 2020 at 17:57, Marcel Holtmann wrote: > > Hi Archie, > > >>>>> MSFT needs rssi parameter for monitoring advertisement packet, > >>>>> therefore we should supply them from mgmt. > >>>>> > >&

Re: [PATCH v1 1/5] Bluetooth: advmon offload MSFT add rssi support

2020-12-04 Thread Archie Pusaka
Hi Marcel, On Fri, 4 Dec 2020 at 17:51, Marcel Holtmann wrote: > > Hi Archie, > > >>> MSFT needs rssi parameter for monitoring advertisement packet, > >>> therefore we should supply them from mgmt. > >>> > >>> Signed-off-by: Archie

Re: [PATCH v1 1/5] Bluetooth: advmon offload MSFT add rssi support

2020-12-03 Thread Archie Pusaka
Hi Marcel, On Thu, 3 Dec 2020 at 22:03, Marcel Holtmann wrote: > > Hi Archie, > > > MSFT needs rssi parameter for monitoring advertisement packet, > > therefore we should supply them from mgmt. > > > > Signed-off-by: Archie Pusaka > > Reviewed-by: Miao-ch

[PATCH v1 5/5] Bluetooth: advmon offload MSFT handle filter enablement

2020-12-03 Thread Archie Pusaka
From: Archie Pusaka Implements the feature to disable/enable the filter used for advertising monitor on MSFT controller, effectively have the same effect as "remove all monitors" and "add all previously removed monitors". This feature would be needed when suspending, whe

[PATCH v1 2/5] Bluetooth: advmon offload MSFT add monitor

2020-12-03 Thread Archie Pusaka
From: Archie Pusaka Enables advertising monitor offloading to the controller, if MSFT extension is supported. The kernel won't adjust the monitor parameters to match what the controller supports - that is the user space's responsibility. This patch only manages the addition of monitors. Monitor

[PATCH v1 4/5] Bluetooth: advmon offload MSFT handle controller reset

2020-12-03 Thread Archie Pusaka
From: Archie Pusaka When the controller is powered off, the registered advertising monitor is removed from the controller. This patch handles the re-registration of those monitors when the power is on. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Reviewed-by: Yun-Hao Chung

[PATCH v1 3/5] Bluetooth: advmon offload MSFT remove monitor

2020-12-03 Thread Archie Pusaka
From: Archie Pusaka Implements the monitor removal functionality for advertising monitor offloading to MSFT controllers. Supply handle = 0 to remove all monitors. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Reviewed-by: Yun-Hao Chung --- include/net/bluetooth/hci_core.h | 8

[PATCH v1 1/5] Bluetooth: advmon offload MSFT add rssi support

2020-12-03 Thread Archie Pusaka
From: Archie Pusaka MSFT needs rssi parameter for monitoring advertisement packet, therefore we should supply them from mgmt. Signed-off-by: Archie Pusaka Reviewed-by: Miao-chen Chou Reviewed-by: Yun-Hao Chung --- include/net/bluetooth/hci_core.h | 9 + include/net/bluetooth

[PATCH v1 0/5] MSFT offloading support for advertisement monitor

2020-12-03 Thread Archie Pusaka
From: Archie Pusaka Hi linux-bluetooth, This series of patches manages the hardware offloading part of MSFT extension API. The full documentation can be accessed by this link: https://docs.microsoft.com/en-us/windows-hardware/drivers/bluetooth/microsoft-defined-bluetooth-hci-commands-and-events

[PATCH v2] Bluetooth: Enforce key size of 16 bytes on FIPS level

2020-11-10 Thread Archie Pusaka
From: Archie Pusaka According to the spec Ver 5.2, Vol 3, Part C, Sec 5.2.2.8: Device in security mode 4 level 4 shall enforce: 128-bit equivalent strength for link and encryption keys required using FIPS approved algorithms (E0 not allowed, SAFER+ not allowed, and P-192 not allowed; encryption

Re: [PATCH v3] Bluetooth: Check for encryption key size on connect

2020-10-04 Thread Archie Pusaka
>>>>>>>>> L2CAP: Connection Request (0x02) ident 3 len 4 > >>>>>>>>>PSM: 4097 (0x1001) > >>>>>>>>>Source CID: 64 > >>>>>>>>> < ACL Data TX: Handle 256 flags 0x00 dlen 16

Re: [PATCH v3] Bluetooth: Check for encryption key size on connect

2020-09-29 Thread Archie Pusaka
gt; Source CID: 64 > >>>>>>> < ACL Data TX: Handle 256 flags 0x00 dlen 16#43 [hci0] > >>>>>>> 5.895213 > >>>>>>> L2CAP: Connection Response (0x03) ident 3 len 8 > >>>>>>> Destinatio

Re: [PATCH v3] Bluetooth: Check for encryption key size on connect

2020-09-28 Thread Archie Pusaka
t;>>>> Result: Connection successful (0x0000) > >>>>> Status: No further information available (0x) > >>>>> > >>>>> // WITH PATCH // > >>>>>> ACL Data RX: Handle 256 flags 0x02 dlen 12

Re: [PATCH v3] Bluetooth: Check for encryption key size on connect

2020-09-28 Thread Archie Pusaka
>>> Source CID: 64 > >>> Result: Connection successful (0x) > >>> Status: No further information available (0x) > >>> > >>> // WITH PATCH // > >>>> ACL Data RX: Handle 256 flags 0x02 dlen

Re: [PATCH v3] Bluetooth: Check for encryption key size on connect

2020-09-26 Thread Archie Pusaka
#42 [hci0] 4.887024 > > L2CAP: Connection Request (0x02) ident 3 len 4 > >PSM: 4097 (0x1001) > >Source CID: 64 > > < ACL Data TX: Handle 256 flags 0x00 dlen 16 #43 [hci0] 4.887127 > > L2CAP: Connection Resp

[PATCH v2] Bluetooth: send proper config param to unknown config request

2020-09-26 Thread Archie Pusaka
From: Archie Pusaka When receiving an L2CAP_CONFIGURATION_REQ with an unknown config type, currently we will reply with L2CAP_CONFIGURATION_RSP with a list of unknown types as the config param. However, this is not a correct format of config param. As described in the bluetooth spec v5.2, Vol 3

Re: [PATCH v2] Bluetooth: Check for encryption key size on connect

2020-09-25 Thread Archie Pusaka
Hi Luiz, On Wed, 23 Sep 2020 at 01:03, Luiz Augusto von Dentz wrote: > > Hi Archie, > > On Tue, Sep 22, 2020 at 12:48 AM Archie Pusaka wrote: > > > > Hi Luiz, > > > > On Tue, 22 Sep 2020 at 01:15, Luiz Augusto von Dentz > > wrote: > > > >

[PATCH v1] Bluetooth: send proper config param to unknown config request

2020-09-24 Thread Archie Pusaka
From: Archie Pusaka When receiving an L2CAP_CONFIGURATION_REQ with an unknown config type, currently we will reply with L2CAP_CONFIGURATION_RSP with a list of unknown types as the config param. However, this is not a correct format of config param. As described in the bluetooth spec v5.2, Vol 3

[PATCH v3] Bluetooth: Check for encryption key size on connect

2020-09-22 Thread Archie Pusaka
From: Archie Pusaka When receiving connection, we only check whether the link has been encrypted, but not the encryption key size of the link. This patch adds check for encryption key size, and reject L2CAP connection which size is below the specified threshold (default 7) with security block

Re: [PATCH v2] Bluetooth: Check for encryption key size on connect

2020-09-22 Thread Archie Pusaka
Hi Luiz, On Tue, 22 Sep 2020 at 01:15, Luiz Augusto von Dentz wrote: > > Hi Archie, > > > On Mon, Sep 21, 2020 at 12:56 AM Archie Pusaka wrote: > > > > From: Archie Pusaka > > > > When receiving connection, we only check whether the link has been > &g

Re: [PATCH v1] Bluetooth: Enforce key size of 16 bytes on FIPS level

2020-09-22 Thread Archie Pusaka
Hi Luiz, On Tue, 22 Sep 2020 at 01:13, Luiz Augusto von Dentz wrote: > > Hi Archie, > > On Mon, Sep 21, 2020 at 1:31 AM Archie Pusaka wrote: > > > > From: Archie Pusaka > > > > According to the spec Ver 5.2, Vol 3, Part C, Sec 5.2.2.8: > > Devic

[PATCH v1] Bluetooth: Enforce key size of 16 bytes on FIPS level

2020-09-21 Thread Archie Pusaka
From: Archie Pusaka According to the spec Ver 5.2, Vol 3, Part C, Sec 5.2.2.8: Device in security mode 4 level 4 shall enforce: 128-bit equivalent strength for link and encryption keys required using FIPS approved algorithms (E0 not allowed, SAFER+ not allowed, and P-192 not allowed; encryption

[PATCH v2] Bluetooth: Check for encryption key size on connect

2020-09-21 Thread Archie Pusaka
From: Archie Pusaka When receiving connection, we only check whether the link has been encrypted, but not the encryption key size of the link. This patch adds check for encryption key size, and reject L2CAP connection which size is below the specified threshold (default 7) with security block

[PATCH v1] Bluetooth: Check for encryption key size on connect

2020-09-17 Thread Archie Pusaka
From: Archie Pusaka When receiving connection, we only check whether the link has been encrypted, but not the encryption key size of the link. This patch adds check for encryption key size, and reject L2CAP connection which size is below the specified threshold (default 7) with security block

Re: [RFC PATCH v1 1/2] Bluetooth: queue ACL packets if no handle is found

2020-06-30 Thread Archie Pusaka
ned > > and discard the queued packet. > > > > Signed-off-by: Archie Pusaka > > Reviewed-by: Abhishek Pandit-Subedi > > so two things up front. I want to hide this behind a > HCI_QUIRK_OUT_OF_ORDER_ACL that a transport driver has to set first. Frankly > if this

[RFC PATCH v1 2/2] Bluetooth: queue L2CAP conn req if encryption is needed

2020-06-27 Thread Archie Pusaka
From: Archie Pusaka It is possible to receive an L2CAP conn req for an encrypted connection, before actually receiving the HCI change encryption event. If this happened, the received L2CAP packet will be ignored. This patch queues the L2CAP packet and process them after the expected HCI event

[RFC PATCH v1 0/2] handle USB endpoint race condition

2020-06-27 Thread Archie Pusaka
From: Archie Pusaka On platforms with USB transport, events and data are transferred via different endpoints. This could potentially cause ordering problems, where the order of processed information is different than the actual order. One such a case is we receive a ACL packet before receiving

[RFC PATCH v1 1/2] Bluetooth: queue ACL packets if no handle is found

2020-06-27 Thread Archie Pusaka
From: Archie Pusaka There is a possibility that an ACL packet is received before we receive the HCI connect event for the corresponding handle. If this happens, we discard the ACL packet. Rather than just ignoring them, this patch provides a queue for incoming ACL packet without a handle