Skip to content

Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_new_connection_cb()

Siwei Zhang linux-bluetooth 11 versions – Applied

Status from this message: This patch was applied to bluetooth/bluetooth-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v12 Latest1 patch 1 replyApplied 1/1
  2. v111 patch 1 replySuperseded
  3. v101 patch 1 replySuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v91 patch10 repliesSuperseded
v81 patch2 repliesSuperseded
v7 posting 2/21 patch2 repliesSuperseded
v61 patch1 replySuperseded
v7 posting 1/21 patch5 repliesSuperseded
v51 patch6 repliesSuperseded
v41 patch5 repliesSuperseded
v21 patch1 replySuperseded

Patches in v12 All 1 applied

#Subject and filesSizeRepliesApplied
1/1Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_new_connection_cb()include/net/bluetooth/l2cap.h net/bluetooth/6lowpan.c net/bluetooth/l2cap_core.c +2 more+127 -1091 replyApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v12 yet.

Read the v12 thread

Cover letter [PATCH v12 0/1] Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_new_connection_cb()

Compared to v2, addresses comments on https://sashiko.dev/#/patchset/20260415204842.2363950-1-oss%40fourdim.xyz .

Compared to v3, rebase against bluetooth-next.

Compared to v4, allocate the channel outside the function and pass it in as an argument to avoid the use-after-free.

Compared to v5, extract the channel init to a separate function.

Compared to v6, balance puts and holds on chans.

Compared to v7, rebase against bluetooth-next and refactor the chan refcounting.

Compared to v8, adopt the philosophy of one assignment one reference. Make refcounting easier to follow.

Compared to v9, rework on l2cap_chan_set_defaults so that new chan's default comes from pchan and can be used by __l2cap_chan_add.

Compared to v10, rebase against bluetooth-next.

Compared to v11, rebase against bluetooth-next.

Siwei Zhang (1):
Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_new_connection_cb()

 include/net/bluetooth/l2cap.h |  10 ++--
 net/bluetooth/6lowpan.c       |  18 +-----
 net/bluetooth/l2cap_core.c    |  78 ++++++++++++++++++++-----
 net/bluetooth/l2cap_sock.c    | 103 ++++++++++++++++------------------
 net/bluetooth/smp.c           |  27 ++-------
 5 files changed, 127 insertions(+), 109 deletions(-)
Signature · 1 line
2.54.0