1. 04 8月, 2021 2 次提交
  2. 02 8月, 2021 1 次提交
  3. 30 7月, 2021 3 次提交
  4. 29 7月, 2021 5 次提交
    • I
      Bluetooth: btusb: Load Broadcom firmware for Dell device 413c:8197 · 340cd23d
      Ian Mackinnon 提交于
      Remove the btusb_table entry for 413c:8197 so the device is handled
      by the later Dell vendor entry, which specifies patchram loading.
      
      T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=02 Dev#=  4 Spd=12   MxCh= 0
      D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=413c ProdID=8197 Rev= 1.12
      S:  Manufacturer=Dell Computer Corp
      S:  Product=DW380 Bluetooth Module
      S:  SerialNumber=74E54354F609
      C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=  0mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I:  If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I:  If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      I:  If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      I:  If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=btusb
      E:  Ad=84(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS=  32 Ivl=0ms
      I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
      Signed-off-by: NIan Mackinnon <imackinnon@gmail.com>
      Tested-By: NAathif Naseer <aathif394@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      340cd23d
    • L
      Bluetooth: btmrvl_sdio: Remove all strcpy() uses · 785077fa
      Len Baker 提交于
      strcpy() performs no bounds checking on the destination buffer. This
      could result in linear overflows beyond the end of the buffer, leading
      to all kinds of misbehaviors. The safe replacement is strscpy() but in
      this case it is better to use the scnprintf to simplify the arithmetic.
      
      This is a previous step in the path to remove the strcpy() function
      entirely from the kernel.
      Signed-off-by: NLen Baker <len.baker@gmx.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      785077fa
    • D
      Bluetooth: skip invalid hci_sync_conn_complete_evt · 92fe24a7
      Desmond Cheong Zhi Xi 提交于
      Syzbot reported a corrupted list in kobject_add_internal [1]. This
      happens when multiple HCI_EV_SYNC_CONN_COMPLETE event packets with
      status 0 are sent for the same HCI connection. This causes us to
      register the device more than once which corrupts the kset list.
      
      As this is forbidden behavior, we add a check for whether we're
      trying to process the same HCI_EV_SYNC_CONN_COMPLETE event multiple
      times for one connection. If that's the case, the event is invalid, so
      we report an error that the device is misbehaving, and ignore the
      packet.
      
      Link: https://syzkaller.appspot.com/bug?extid=66264bf2fd0476be7e6c [1]
      Reported-by: syzbot+66264bf2fd0476be7e6c@syzkaller.appspotmail.com
      Tested-by: syzbot+66264bf2fd0476be7e6c@syzkaller.appspotmail.com
      Signed-off-by: NDesmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      92fe24a7
    • T
      Bluetooth: mgmt: Fix wrong opcode in the response for add_adv cmd · a25fca4d
      Tedd Ho-Jeong An 提交于
      This patch fixes the MGMT add_advertising command repsones with the
      wrong opcode when it is trying to return the not supported error.
      
      Fixes: cbbdfa6f ("Bluetooth: Enable controller RPA resolution using Experimental feature")
      Signed-off-by: NTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: NLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      a25fca4d
    • T
      Bluetooth: defer cleanup of resources in hci_unregister_dev() · 58ce6d5b
      Tetsuo Handa 提交于
      syzbot is hitting might_sleep() warning at hci_sock_dev_event()
      due to calling lock_sock() with rw spinlock held [1].
      
      It seems that history of this locking problem is a trial and error.
      
      Commit b40df574 ("[PATCH] bluetooth: fix socket locking in
      hci_sock_dev_event()") in 2.6.21-rc4 changed bh_lock_sock() to lock_sock()
      as an attempt to fix lockdep warning.
      
      Then, commit 4ce61d1c ("[BLUETOOTH]: Fix locking in
      hci_sock_dev_event().") in 2.6.22-rc2 changed lock_sock() to
      local_bh_disable() + bh_lock_sock_nested() as an attempt to fix
      sleep in atomic context warning.
      
      Then, commit 4b5dd696 ("Bluetooth: Remove local_bh_disable() from
      hci_sock.c") in 3.3-rc1 removed local_bh_disable().
      
      Then, commit e305509e ("Bluetooth: use correct lock to prevent UAF
      of hdev object") in 5.13-rc5 again changed bh_lock_sock_nested() to
      lock_sock() as an attempt to fix CVE-2021-3573.
      
      This difficulty comes from current implementation that
      hci_sock_dev_event(HCI_DEV_UNREG) is responsible for dropping all
      references from sockets because hci_unregister_dev() immediately reclaims
      resources as soon as returning from hci_sock_dev_event(HCI_DEV_UNREG).
      But the history suggests that hci_sock_dev_event(HCI_DEV_UNREG) was not
      doing what it should do.
      
      Therefore, instead of trying to detach sockets from device, let's accept
      not detaching sockets from device at hci_sock_dev_event(HCI_DEV_UNREG),
      by moving actual cleanup of resources from hci_unregister_dev() to
      hci_release_dev() which is called by bt_host_release when all references
      to this unregistered device (which is a kobject) are gone.
      
      Link: https://syzkaller.appspot.com/bug?extid=a5df189917e79d5e59c9 [1]
      Reported-by: Nsyzbot <syzbot+a5df189917e79d5e59c9@syzkaller.appspotmail.com>
      Signed-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Tested-by: Nsyzbot <syzbot+a5df189917e79d5e59c9@syzkaller.appspotmail.com>
      Fixes: e305509e ("Bluetooth: use correct lock to prevent UAF of hdev object")
      Signed-off-by: NLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      58ce6d5b
  5. 24 7月, 2021 1 次提交
  6. 23 7月, 2021 4 次提交
    • A
      Bluetooth: hci_h5: Add runtime suspend · d9dd833c
      Archie Pusaka 提交于
      This patch allows the controller to suspend after a short period of
      inactivity.
      Signed-off-by: NArchie Pusaka <apusaka@chromium.org>
      Reviewed-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
      Reviewed-by: NHilda Wu <hildawu@realtek.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      d9dd833c
    • A
      Bluetooth: hci_h5: btrtl: Maintain flow control if wakeup is enabled · 30f11dda
      Archie Pusaka 提交于
      For chips that doesn't reset on suspend, we need to provide the correct
      value of flow_control when it resumes. Therefore, store the flow
      control value when reading from the config file to be reused upon
      suspend.
      Signed-off-by: NArchie Pusaka <apusaka@chromium.org>
      Reviewed-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
      Reviewed-by: NHilda Wu <hildawu@realtek.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      30f11dda
    • A
      Bluetooth: hci_h5: add WAKEUP_DISABLE flag · 66f077dd
      Archie Pusaka 提交于
      Some RTL chips resets the FW on suspend, so wakeup is disabled on
      those chips. This patch introduces this WAKEUP_DISABLE flag so that
      chips that doesn't reset FW on suspend can leave the flag unset and
      is allowed to wake the host.
      
      This patch also left RTL8822 WAKEUP_DISABLE flag unset, therefore
      allowing it to wake the host, and preventing reprobing on resume.
      Signed-off-by: NArchie Pusaka <apusaka@chromium.org>
      Reviewed-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
      Reviewed-by: NHilda Wu <hildawu@realtek.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      66f077dd
    • A
      Bluetooth: btusb: Add support for Foxconn Mediatek Chip · 64832df2
      Aaron Ma 提交于
      Add support for another Foxconn / Hon Hai device with MT7921 chip.
      
      T:  Bus=05 Lev=01 Prnt=01 Port=03 Cnt=02 Dev#=  3 Spd=480  MxCh= 0
      D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=0489 ProdID=e0cd Rev= 1.00
      S:  Manufacturer=MediaTek Inc.
      S:  Product=Wireless_Device
      S:  SerialNumber=000000000
      C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA
      A:  FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=125us
      E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      I:  If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  63 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  63 Ivl=1ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
      E:  Ad=8a(I) Atr=03(Int.) MxPS=  64 Ivl=125us
      E:  Ad=0a(O) Atr=03(Int.) MxPS=  64 Ivl=125us
      I:  If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
      E:  Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us
      E:  Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us
      Signed-off-by: NAaron Ma <aaron.ma@canonical.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      64832df2
  7. 22 7月, 2021 24 次提交