Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: torvalds/linux
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: pv/linux
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 15 commits
  • 16 files changed
  • 8 contributors

Commits on Apr 13, 2026

  1. Bluetooth: SCO: fix sleeping under spinlock in sco_conn_ready

    sco_conn_ready calls sleeping functions under conn->lock spinlock.
    
    The critical section can be reduced: conn->hcon is modified only with
    hdev->lock held. It is guaranteed to be held in sco_conn_ready, so
    conn->lock is not needed to guard it.
    
    Move taking conn->lock after lock_sock(parent). This also follows the
    lock ordering lock_sock() > conn->lock elsewhere in the file.
    
    Fixes: 27c24fd ("Bluetooth: switch to lock_sock in SCO")
    Signed-off-by: Pauli Virtanen <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    pv authored and Vudentz committed Apr 13, 2026
    Configuration menu
    Copy the full SHA
    d87bd74 View commit details
    Browse the repository at this point in the history
  2. Bluetooth: hci_conn: fix potential UAF in create_big_sync

    Add hci_conn_valid() check in create_big_sync() to detect stale
    connections before proceeding with BIG creation. Handle the
    resulting -ECANCELED in create_big_complete() and re-validate the
    connection under hci_dev_lock() before dereferencing, matching the
    pattern used by create_le_conn_complete() and create_pa_complete().
    
    Keep the hci_conn object alive across the async boundary by taking
    a reference via hci_conn_get() when queueing create_big_sync(), and
    dropping it in the completion callback. The refcount and the lock
    are complementary: the refcount keeps the object allocated, while
    hci_dev_lock() serializes hci_conn_hash_del()'s list_del_rcu() on
    hdev->conn_hash, as required by hci_conn_del().
    
    hci_conn_put() is called outside hci_dev_unlock() so the final put
    (which resolves to kfree() via bt_link_release) does not run under
    hdev->lock, though the release path would be safe either way.
    
    Without this, create_big_complete() would unconditionally
    dereference the conn pointer on error, causing a use-after-free
    via hci_connect_cfm() and hci_conn_del().
    
    Fixes: eca0ae4 ("Bluetooth: Add initial implementation of BIS connections")
    Cc: [email protected]
    Co-developed-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: David Carlier <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    devnexen authored and Vudentz committed Apr 13, 2026
    Configuration menu
    Copy the full SHA
    d55d107 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2026

  1. Bluetooth: btintel_pcie: Support Product level reset

    When driver encounters a TOP exception, ACPI methods will be called
    for Product level reset since Wifi and BT share the same TOP. BT driver
    will first reprobe the wifi driver and then reprobe BT.
    
    Signed-off-by: Chandrashekar Devegowda <[email protected]>
    Signed-off-by: Venkat Rao Bagalkote <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    devegowdIntel authored and Vudentz committed Apr 16, 2026
    Configuration menu
    Copy the full SHA
    d8a65fc View commit details
    Browse the repository at this point in the history
  2. Bluetooth: hci_event: Fix OOB read and infinite loop in hci_le_create…

    …_big_complete_evt
    
    hci_le_create_big_complete_evt() iterates over BT_BOUND connections for
    a BIG handle using a while loop, accessing ev->bis_handle[i++] on each
    iteration.  However, there is no check that i stays within ev->num_bis
    before the array access.
    
    When a controller sends a LE_Create_BIG_Complete event with fewer
    bis_handle entries than there are BT_BOUND connections for that BIG,
    or with num_bis=0, the loop reads beyond the valid bis_handle[] flex
    array into adjacent heap memory.  Since the out-of-bounds values
    typically exceed HCI_CONN_HANDLE_MAX (0x0EFF), hci_conn_set_handle()
    rejects them and the connection remains in BT_BOUND state.  The same
    connection is then found again by hci_conn_hash_lookup_big_state(),
    creating an infinite loop with hci_dev_lock held.
    
    Fix this by terminating the BIG if in case not all BIS could be setup
    properly.
    
    Fixes: a0bfde1 ("Bluetooth: ISO: Add support for connecting multiple BISes")
    Cc: [email protected]
    Signed-off-by: ZhiTao Ou <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Vudentz committed Apr 16, 2026
    Configuration menu
    Copy the full SHA
    f64d47d View commit details
    Browse the repository at this point in the history
  3. Bluetooth: btusb: MT7922: Add VID/PID 0e8d/223c

    Add VID 0e8d & PID 223c for MediaTek MT7922 USB Bluetooth chip.
    
    The information in /sys/kernel/debug/usb/devices about the Bluetooth
    device is listed as the below.
    
    T:  Bus=07 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
    D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
    P:  Vendor=0e8d ProdID=223c 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=btusb
    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=btusb
    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: Chris Lu <[email protected]>
    Reviewed-by: Paul Menzel <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    ChrisCH-Lu authored and Vudentz committed Apr 16, 2026
    Configuration menu
    Copy the full SHA
    e646bfd View commit details
    Browse the repository at this point in the history
  4. Bluetooth: btusb: MT7925: Add VID/PID 0e8d/8c38

    Add VID 0e8d & PID 8c38 for MediaTek MT7925 USB Bluetooth chip.
    
    The information in /sys/kernel/debug/usb/devices about the Bluetooth
    device is listed as the below.
    
    T:  Bus=06 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
    D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
    P:  Vendor=0e8d ProdID=8c38 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=btusb
    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=btusb
    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: Chris Lu <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    ChrisCH-Lu authored and Vudentz committed Apr 16, 2026
    Configuration menu
    Copy the full SHA
    7b1564d View commit details
    Browse the repository at this point in the history
  5. Bluetooth: bnep: fix incorrect length parsing in bnep_rx_frame() exte…

    …nsion handling
    
    In bnep_rx_frame(), the BNEP_FILTER_NET_TYPE_SET and
    BNEP_FILTER_MULTI_ADDR_SET extension header parsing has two bugs:
    
    1) The 2-byte length field is read with *(u16 *)(skb->data + 1), which
       performs a native-endian read. The BNEP protocol specifies this field
       in big-endian (network byte order), and the same file correctly uses
       get_unaligned_be16() for the identical fields in
       bnep_ctrl_set_netfilter() and bnep_ctrl_set_mcfilter().
    
    2) The length is multiplied by 2, but unlike BNEP_SETUP_CONN_REQ where
       the length byte counts UUID pairs (requiring * 2 for two UUIDs per
       entry), the filter extension length field already represents the total
       data size in bytes. This is confirmed by bnep_ctrl_set_netfilter()
       which reads the same field as a byte count and divides by 4 to get
       the number of filter entries.
    
       The bogus * 2 means skb_pull advances twice as far as it should,
       either dropping valid data from the next header or causing the pull
       to fail entirely when the doubled length exceeds the remaining skb.
    
    Fix by splitting the pull into two steps: first use skb_pull_data() to
    safely pull and validate the 3-byte fixed header (ctrl type + length),
    then pull the variable-length data using the properly decoded length.
    
    Fixes: bf8b9a9 ("Bluetooth: bnep: Add support to extended headers of control frames")
    Signed-off-by: Dudu Lu <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    phx0fer authored and Vudentz committed Apr 16, 2026
    Configuration menu
    Copy the full SHA
    e2535ba View commit details
    Browse the repository at this point in the history
  6. Bluetooth: l2cap: fix MPS check in l2cap_ecred_reconf_req

    The L2CAP specification states that if more than one channel is being
    reconfigured, the MPS shall not be decreased. The current check has
    two issues:
    
    1) The comparison uses >= (greater-than-or-equal), which incorrectly
       rejects reconfiguration requests where the MPS stays the same.
       Since the spec says MPS "shall be greater than or equal to the
       current MPS", only a strict decrease (remote_mps > mps) should be
       rejected. Keeping the same MPS is valid.
    
    2) The multi-channel guard uses `&& i` (loop index) to approximate
       "more than one channel", but this incorrectly allows MPS decrease
       for the first channel (i==0) even when multiple channels are being
       reconfigured. Replace with `&& num_scid > 1` which correctly
       checks whether the request covers more than one channel.
    
    Signed-off-by: Dudu Lu <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    phx0fer authored and Vudentz committed Apr 16, 2026
    Configuration menu
    Copy the full SHA
    0827726 View commit details
    Browse the repository at this point in the history
  7. Bluetooth: l2cap: defer conn param update to avoid conn->lock/hdev->l…

    …ock inversion
    
    When a BLE peripheral sends an L2CAP Connection Parameter Update Request
    the processing path is:
    
      process_pending_rx()          [takes conn->lock]
        l2cap_le_sig_channel()
          l2cap_conn_param_update_req()
            hci_le_conn_update()    [takes hdev->lock]
    
    Meanwhile other code paths take the locks in the opposite order:
    
      l2cap_chan_connect()          [takes hdev->lock]
        ...
          mutex_lock(&conn->lock)
    
      l2cap_conn_ready()            [hdev->lock via hci_cb_list_lock]
        ...
          mutex_lock(&conn->lock)
    
    This is a classic AB/BA deadlock which lockdep reports as a circular
    locking dependency when connecting a BLE MIDI keyboard (Carry-On FC-49).
    
    Fix this by making hci_le_conn_update() defer the HCI command through
    hci_cmd_sync_queue() so it no longer needs to take hdev->lock in the
    caller context.  The sync callback uses __hci_cmd_sync_status_sk() to
    wait for the HCI_EV_LE_CONN_UPDATE_COMPLETE event, then updates the
    stored connection parameters (hci_conn_params) and notifies userspace
    (mgmt_new_conn_param) only after the controller has confirmed the update.
    
    A reference on hci_conn is held via hci_conn_get()/hci_conn_put() for
    the lifetime of the queued work to prevent use-after-free, and
    hci_conn_valid() is checked before proceeding in case the connection was
    removed while the work was pending.  The hci_dev_lock is held across
    hci_conn_valid() and all conn field accesses to prevent a concurrent
    disconnect from invalidating the connection mid-use.
    
    Fixes: f044eb0 ("Bluetooth: Store latency and supervision timeout in connection params")
    Signed-off-by: Mikhail Gavrilov <[email protected]>
    Reviewed-by: Paul Menzel <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    NTMan authored and Vudentz committed Apr 16, 2026
    Configuration menu
    Copy the full SHA
    fe2f860 View commit details
    Browse the repository at this point in the history
  8. Bluetooth: L2CAP: Fix null-ptr-deref in l2cap_sock_state_change_cb()

    Add the same NULL guard already present in
    l2cap_sock_resume_cb() and l2cap_sock_ready_cb().
    
    Fixes: 89bc500 ("Bluetooth: Add state tracking to struct l2cap_chan")
    Cc: [email protected]
    Signed-off-by: Siwei Zhang <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    fourdim authored and Vudentz committed Apr 16, 2026
    Configuration menu
    Copy the full SHA
    e95f060 View commit details
    Browse the repository at this point in the history
  9. Bluetooth: L2CAP: Fix null-ptr-deref in l2cap_sock_get_sndtimeo_cb()

    Add the same NULL guard already present in
    l2cap_sock_resume_cb() and l2cap_sock_ready_cb().
    
    Fixes: 8d836d7 ("Bluetooth: Access sk_sndtimeo indirectly in l2cap_core.c")
    Cc: [email protected]
    Signed-off-by: Siwei Zhang <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    fourdim authored and Vudentz committed Apr 16, 2026
    Configuration menu
    Copy the full SHA
    4ccc9d2 View commit details
    Browse the repository at this point in the history
  10. Bluetooth: L2CAP: Fix null-ptr-deref in l2cap_sock_new_connection_cb()

    Add the same NULL guard already present in
    l2cap_sock_resume_cb() and l2cap_sock_ready_cb().
    
    Fixes: 80808e4 ("Bluetooth: Add l2cap_chan_ops abstraction")
    Cc: [email protected]
    Signed-off-by: Siwei Zhang <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    fourdim authored and Vudentz committed Apr 16, 2026
    Configuration menu
    Copy the full SHA
    73357fb View commit details
    Browse the repository at this point in the history
  11. Bluetooth: btmtk: add event filter to filter specific event

    Add an event filter to filter event with specific opcode to prevent BT
    stack from receiving unexpected event.
    
    Event with opcode 0xfc5d is generated when MediaTek's Bluetooth enable
    firmware logs and is not expected to be sent to userspace.
    
    Signed-off-by: Chris Lu <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    ChrisCH-Lu authored and Vudentz committed Apr 16, 2026
    Configuration menu
    Copy the full SHA
    b57b0f2 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2026

  1. Bluetooth: SCO: hold sk properly in sco_conn_ready

    sk deref in sco_conn_ready must be done either under conn->lock, or
    holding a refcount, to avoid concurrent close. conn->sk and parent sk is
    currently accessed without either, and without checking parent->sk_state:
    
        [Task 1]            [Task 2]
                            sco_sock_release
        sco_conn_ready
          sk = conn->sk
                              lock_sock(sk)
                                conn->sk = NULL
          lock_sock(sk)
                              release_sock(sk)
                              sco_sock_kill(sk)
           UAF on sk deref
    
    and similarly for access to sco_get_sock_listen() return value.
    
    Fix possible UAF by holding sk refcount in sco_conn_ready() and making
    sco_get_sock_listen() increase refcount. Also recheck after lock_sock
    that the socket is still valid.  Adjust conn->sk locking so it's
    protected also by lock_sock() of the associated socket if any.
    
    Fixes: 27c24fd ("Bluetooth: switch to lock_sock in SCO")
    Signed-off-by: Pauli Virtanen <[email protected]>
    pv committed Apr 18, 2026
    Configuration menu
    Copy the full SHA
    023e04a View commit details
    Browse the repository at this point in the history
  2. debug

    pv committed Apr 18, 2026
    Configuration menu
    Copy the full SHA
    a7b06db View commit details
    Browse the repository at this point in the history
Loading