syzbot


KASAN: wild-memory-access Read in l2cap_connect_cfm

Status: upstream: reported on 2025/03/17 15:57
Subsystems: bluetooth
[Documentation on labels]
Reported-by: syzbot+0e4ebcc970728e056324@syzkaller.appspotmail.com
First crash: 122d, last: 1d06h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bluetooth?] KASAN: wild-memory-access Read in l2cap_connect_cfm 0 (1) 2025/03/17 15:57
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in l2cap_connect_cfm bluetooth 19 syz inconclusive 36 129d 208d 0/29 closed as invalid on 2025/03/07 00:26
linux-6.1 KASAN: use-after-free Read in l2cap_connect_cfm 19 6 45d 267d 0/3 upstream: reported on 2024/10/19 04:09
linux-5.15 KASAN: use-after-free Read in l2cap_connect_cfm 19 3 59d 157d 0/3 upstream: reported on 2025/02/05 20:58

Sample crash report:
==================================================================
BUG: KASAN: wild-memory-access in instrument_atomic_read include/linux/instrumented.h:68 [inline]
BUG: KASAN: wild-memory-access in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
BUG: KASAN: wild-memory-access in l2cap_chan_lock include/net/bluetooth/l2cap.h:827 [inline]
BUG: KASAN: wild-memory-access in l2cap_conn_ready net/bluetooth/l2cap_core.c:1625 [inline]
BUG: KASAN: wild-memory-access in l2cap_connect_cfm+0x500/0xd40 net/bluetooth/l2cap_core.c:7288
Read of size 4 at addr deacfffffffffc8c by task kworker/u9:3/6532

CPU: 1 UID: 0 PID: 6532 Comm: kworker/u9:3 Not tainted 6.16.0-rc5-syzkaller-gec4801305969 #0 PREEMPT 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: hci1 hci_rx_work
Call trace:
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C)
 __dump_stack+0x30/0x40 lib/dump_stack.c:94
 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120
 print_report+0x58/0x84 mm/kasan/report.c:524
 kasan_report+0xb0/0x110 mm/kasan/report.c:634
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:189
 __kasan_check_read+0x20/0x30 mm/kasan/shadow.c:31
 instrument_atomic_read include/linux/instrumented.h:68 [inline]
 atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
 l2cap_chan_lock include/net/bluetooth/l2cap.h:827 [inline]
 l2cap_conn_ready net/bluetooth/l2cap_core.c:1625 [inline]
 l2cap_connect_cfm+0x500/0xd40 net/bluetooth/l2cap_core.c:7288
 hci_connect_cfm+0x98/0x134 include/net/bluetooth/hci_core.h:2056
 le_conn_complete_evt+0x9f4/0xe84 net/bluetooth/hci_event.c:5755
 hci_le_conn_complete_evt+0x114/0x3f8 net/bluetooth/hci_event.c:5781
 hci_le_meta_evt+0x2cc/0x4b0 net/bluetooth/hci_event.c:7164
 hci_event_func net/bluetooth/hci_event.c:7472 [inline]
 hci_event_packet+0x60c/0xe9c net/bluetooth/hci_event.c:7529
 hci_rx_work+0x320/0xb18 net/bluetooth/hci_core.c:4070
 process_one_work+0x7e8/0x155c kernel/workqueue.c:3238
 process_scheduled_works kernel/workqueue.c:3321 [inline]
 worker_thread+0x958/0xed8 kernel/workqueue.c:3402
 kthread+0x5fc/0x75c kernel/kthread.c:464
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:843
==================================================================
Unable to handle kernel paging request at virtual address fbd51fffffffff91
KASAN: maybe wild-memory-access in range [0xdeacfffffffffc88-0xdeacfffffffffc8f]
Mem abort info:
  ESR = 0x0000000096000004
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x04: level 0 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
  CM = 0, WnR = 0, TnD = 0, TagAccess = 0
  GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[fbd51fffffffff91] address between user and kernel address ranges
Internal error: Oops: 0000000096000004 [#1]  SMP
Modules linked in:
CPU: 1 UID: 0 PID: 6532 Comm: kworker/u9:3 Tainted: G    B               6.16.0-rc5-syzkaller-gec4801305969 #0 PREEMPT 
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: hci1 hci_rx_work
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : raw_atomic_read include/linux/atomic/atomic-arch-fallback.h:457 [inline]
pc : atomic_read include/linux/atomic/atomic-instrumented.h:33 [inline]
pc : l2cap_chan_lock include/net/bluetooth/l2cap.h:827 [inline]
pc : l2cap_conn_ready net/bluetooth/l2cap_core.c:1625 [inline]
pc : l2cap_connect_cfm+0x50c/0xd40 net/bluetooth/l2cap_core.c:7288
lr : instrument_atomic_read include/linux/instrumented.h:68 [inline]
lr : atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
lr : l2cap_chan_lock include/net/bluetooth/l2cap.h:827 [inline]
lr : l2cap_conn_ready net/bluetooth/l2cap_core.c:1625 [inline]
lr : l2cap_connect_cfm+0x500/0xd40 net/bluetooth/l2cap_core.c:7288
sp : ffff8000a2c07520
x29: ffff8000a2c075c0 x28: dfff800000000000 x27: 1fffe0001d1ff007
x26: ffff0000c761b81a x25: 0000000000000080 x24: deacfffffffffc8c
x23: 1fffe00018ec3703 x22: dead000000000100 x21: ffff0000c761bac0
x20: ffff0000e8ff803d x19: ffff0000c761b800 x18: 1fffe000337d8876
x17: 0000000000000000 x16: ffff80008aefc458 x15: 0000000000000001
x14: 1ffff000125d92f4 x13: 0000000000000000 x12: 0000000000000000
x11: 0000000000100000 x10: 0000000000011acd x9 : 0000000000000007
x8 : 1bd59fffffffff91 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff8000a2c06d98 x4 : ffff80008f766be0 x3 : ffff8000803b8030
x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
 raw_atomic_read include/linux/atomic/atomic-arch-fallback.h:457 [inline] (P)
 atomic_read include/linux/atomic/atomic-instrumented.h:33 [inline] (P)
 l2cap_chan_lock include/net/bluetooth/l2cap.h:827 [inline] (P)
 l2cap_conn_ready net/bluetooth/l2cap_core.c:1625 [inline] (P)
 l2cap_connect_cfm+0x50c/0xd40 net/bluetooth/l2cap_core.c:7288 (P)
 hci_connect_cfm+0x98/0x134 include/net/bluetooth/hci_core.h:2056
 le_conn_complete_evt+0x9f4/0xe84 net/bluetooth/hci_event.c:5755
 hci_le_conn_complete_evt+0x114/0x3f8 net/bluetooth/hci_event.c:5781
 hci_le_meta_evt+0x2cc/0x4b0 net/bluetooth/hci_event.c:7164
 hci_event_func net/bluetooth/hci_event.c:7472 [inline]
 hci_event_packet+0x60c/0xe9c net/bluetooth/hci_event.c:7529
 hci_rx_work+0x320/0xb18 net/bluetooth/hci_core.c:4070
 process_one_work+0x7e8/0x155c kernel/workqueue.c:3238
 process_scheduled_works kernel/workqueue.c:3321 [inline]
 worker_thread+0x958/0xed8 kernel/workqueue.c:3402
 kthread+0x5fc/0x75c kernel/kthread.c:464
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:843
Code: 977ff0c6 d343ff08 12000b09 11000d29 (38fc6908) 
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
   0:	977ff0c6 	bl	0xfffffffffdffc318
   4:	d343ff08 	lsr	x8, x24, #3
   8:	12000b09 	and	w9, w24, #0x7
   c:	11000d29 	add	w9, w9, #0x3
* 10:	38fc6908 	ldrsb	w8, [x8, x28] <-- trapping instruction

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/12 12:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ec4801305969 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: wild-memory-access Read in l2cap_connect_cfm
2025/06/27 17:37 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9aa9b43d689e 803ce19b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: wild-memory-access Read in l2cap_connect_cfm
2025/06/19 05:03 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 39dfc971e42d ed3e87f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: wild-memory-access Read in l2cap_connect_cfm
2025/03/13 06:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 78e3fd2b7e4b 1a5d9317 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: wild-memory-access Read in l2cap_connect_cfm
2025/06/30 15:29 upstream d0b3b7b22dfa fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in l2cap_connect_cfm
2025/06/09 04:35 upstream 19272b37aa4f 4826c28e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-use-after-free Read in l2cap_connect_cfm
2025/04/09 19:21 upstream a24588245776 988b336c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in l2cap_connect_cfm
2025/04/07 07:15 upstream 16cd1c265776 1c65791e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-use-after-free Read in l2cap_connect_cfm
2025/04/07 06:02 upstream 16cd1c265776 1c65791e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-use-after-free Read in l2cap_connect_cfm
2025/06/26 02:40 linux-next 1b152eeca84a 26d77996 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-use-after-free Read in l2cap_connect_cfm
2025/07/01 10:20 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6625c855789e 6e83b42d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-use-after-free Read in l2cap_connect_cfm
2025/06/28 14:54 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9aa9b43d689e fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-use-after-free Read in l2cap_connect_cfm
2025/03/14 02:26 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 059f6cbcfa70 e2826670 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-use-after-free Read in l2cap_connect_cfm
* Struck through repros no longer work on HEAD.