Skip to content

Bluetooth: ISO: Fix KCSAN data-races on iso_pi(sk)

SeungJu Cheon linux-bluetooth linux-kernel-mentees lkml netdev 2 versions – Applied

Status from this message: This series 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. v2 Latest2 patches 1 replyApplied 2/2
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Patch 1/2: Use sa->iso_bdaddr directly instead of caching the bacmp() result in a local variable, as suggested by Luiz [1]. This avoids reading from iso_pi(sk) entirely for the broadcast check.

- Patch 2/2: No changes.

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2Bluetooth: ISO: Fix data-race on dst in iso_sock_connect()net/bluetooth/iso.c+1 -11 replyApplied
2/2Bluetooth: ISO: Fix data-race on iso_pi(sk) in socket and HCI event pathsnet/bluetooth/iso.c+30 -240 repliesApplied

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/2] Bluetooth: ISO: Fix KCSAN data-races on iso_pi(sk)

Found while auditing iso_pi(sk) field accesses after a KCSAN report. Patch 1/2 is the reported race on iso_pi(sk)->dst in iso_sock_connect(); patch 2/2 covers related races on other iso_pi(sk) fields accessed in iso_connect_{bis,cis}() and iso_connect_ind() that were found by inspection during the same audit.

Changes in v2:
- Patch 1/2: Use sa->iso_bdaddr directly instead of caching the bacmp() result in a local variable, as suggested by Luiz [1]. This avoids reading from iso_pi(sk) entirely for the broadcast check.

- Patch 2/2: No changes.

v1: https://lore.kernel.org/linux-bluetooth/[email protected]/

[1] https://lore.kernel.org/linux-bluetooth/CABBYNZLBoU3byfK_G+=sTkBx3wNwEh2X6_7dG4+4LFtrc3Skpw@mail.gmail.com/

SeungJu Cheon (2):
Bluetooth: ISO: Fix data-race on dst in iso_sock_connect()
Bluetooth: ISO: Fix data-race on iso_pi(sk) in socket and HCI event
paths

 net/bluetooth/iso.c | 56 +++++++++++++++++++++++++--------------------
 1 file changed, 31 insertions(+), 25 deletions(-)
Signature · 1 line
2.52.0