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: 5d04h, last: 4d08h
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 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in l2cap_connect_cfm bluetooth syz inconclusive 36 11d 90d 0/28 closed as invalid on 2025/03/07 00:26
linux-6.1 KASAN: use-after-free Read in l2cap_connect_cfm 5 17d 150d 0/3 upstream: reported on 2024/10/19 04:09
linux-5.15 KASAN: use-after-free Read in l2cap_connect_cfm 1 40d 40d 0/3 upstream: reported on 2025/02/05 20:58

Sample crash report:
kobject: kobject_add_internal failed for hci1:201 with -EEXIST, don't try to register things with the same name in the same directory.
Bluetooth: hci1: failed to register connection device
==================================================================
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:1624 [inline]
BUG: KASAN: wild-memory-access in l2cap_connect_cfm+0x538/0xde4 net/bluetooth/l2cap_core.c:7245
Read of size 4 at addr deacfffffffffc8c by task kworker/u9:3/6449

CPU: 1 UID: 0 PID: 6449 Comm: kworker/u9:3 Not tainted 6.14.0-rc6-syzkaller-g78e3fd2b7e4b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Workqueue: hci1 hci_rx_work
Call trace:
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C)
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120
 print_report+0xf8/0x550 mm/kasan/report.c:524
 kasan_report+0xd8/0x138 mm/kasan/report.c:634
 kasan_check_range+0x268/0x2a8 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:1624 [inline]
 l2cap_connect_cfm+0x538/0xde4 net/bluetooth/l2cap_core.c:7245
 hci_connect_cfm+0x120/0x1d4 include/net/bluetooth/hci_core.h:2051
 le_conn_complete_evt+0xa70/0xf80 net/bluetooth/hci_event.c:5763
 hci_le_conn_complete_evt+0x114/0x404 net/bluetooth/hci_event.c:5789
 hci_le_meta_evt+0x2a4/0x478 net/bluetooth/hci_event.c:7162
 hci_event_func net/bluetooth/hci_event.c:7470 [inline]
 hci_event_packet+0x884/0x1060 net/bluetooth/hci_event.c:7525
 hci_rx_work+0x31c/0xb04 net/bluetooth/hci_core.c:4015
 process_one_work+0x810/0x1638 kernel/workqueue.c:3238
 process_scheduled_works kernel/workqueue.c:3319 [inline]
 worker_thread+0x97c/0xeec kernel/workqueue.c:3400
 kthread+0x65c/0x7b0 kernel/kthread.c:464
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862
==================================================================
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] PREEMPT SMP
Modules linked in:
CPU: 1 UID: 0 PID: 6449 Comm: kworker/u9:3 Tainted: G    B              6.14.0-rc6-syzkaller-g78e3fd2b7e4b #0
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/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:1624 [inline]
pc : l2cap_connect_cfm+0x53c/0xde4 net/bluetooth/l2cap_core.c:7245
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:1624 [inline]
lr : l2cap_connect_cfm+0x538/0xde4 net/bluetooth/l2cap_core.c:7245
sp : ffff8000a1577460
x29: ffff8000a1577500 x28: ffff0000d4756000 x27: 1fffe0001afe1a03
x26: dfff800000000000 x25: ffff0000d47564b0 x24: ffff0000d7f0d01a
x23: dead000000000100 x22: ffff0000d7f0d2c0 x21: 1fffe0001b467007
x20: ffff0000da33803d x19: deacfffffffffc8c x18: 1fffe000366f6086
x17: ffff80008fbbd000 x16: ffff80008b7cba1c x15: 0000000000000001
x14: 1ffff0001262eaf8 x13: 0000000000000000 x12: 0000000000000000
x11: 0000000000100000 x10: 00000000000596ee x9 : 0000000000000000
x8 : 1bd59fffffffff91 x7 : 1fffe000366f6087 x6 : ffff8000803d4bfc
x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff8000802f88ec
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:1624 [inline] (P)
 l2cap_connect_cfm+0x53c/0xde4 net/bluetooth/l2cap_core.c:7245 (P)
 hci_connect_cfm+0x120/0x1d4 include/net/bluetooth/hci_core.h:2051
 le_conn_complete_evt+0xa70/0xf80 net/bluetooth/hci_event.c:5763
 hci_le_conn_complete_evt+0x114/0x404 net/bluetooth/hci_event.c:5789
 hci_le_meta_evt+0x2a4/0x478 net/bluetooth/hci_event.c:7162
 hci_event_func net/bluetooth/hci_event.c:7470 [inline]
 hci_event_packet+0x884/0x1060 net/bluetooth/hci_event.c:7525
 hci_rx_work+0x31c/0xb04 net/bluetooth/hci_core.c:4015
 process_one_work+0x810/0x1638 kernel/workqueue.c:3238
 process_scheduled_works kernel/workqueue.c:3319 [inline]
 worker_thread+0x97c/0xeec kernel/workqueue.c:3400
 kthread+0x65c/0x7b0 kernel/kthread.c:464
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862
Code: 52800081 aa1303e0 97568921 d343fe68 (38fa6908) 
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
   0:	52800081 	mov	w1, #0x4                   	// #4
   4:	aa1303e0 	mov	x0, x19
   8:	97568921 	bl	0xfffffffffd5a248c
   c:	d343fe68 	lsr	x8, x19, #3
* 10:	38fa6908 	ldrsb	w8, [x8, x26] <-- trapping instruction

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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/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.