syzbot


KASAN: null-ptr-deref Write in l2cap_sock_suspend_cb (3)

Status: upstream: reported on 2025/12/09 14:28
Subsystems: bluetooth
[Documentation on labels]
Reported-by: syzbot+b47462dd9d3cf7eb9729@syzkaller.appspotmail.com
First crash: 54d, last: 41d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bluetooth?] KASAN: null-ptr-deref Write in l2cap_sock_suspend_cb (3) 0 (1) 2025/12/09 14:28
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.6 KASAN: null-ptr-deref Write in l2cap_sock_suspend_cb 12 1 207d 207d 0/2 auto-obsoleted due to no activity on 2025/10/13 20:35
upstream KASAN: null-ptr-deref Write in l2cap_sock_suspend_cb bluetooth 12 1 867d 861d 0/29 auto-obsoleted due to no activity on 2023/12/23 09:03
upstream KASAN: null-ptr-deref Write in l2cap_sock_suspend_cb (2) bluetooth 12 2 193d 196d 0/29 closed as invalid on 2025/08/19 19:15

Sample crash report:
kobject: kobject_add_internal failed for hci0:201 with -EEXIST, don't try to register things with the same name in the same directory.
Bluetooth: hci0: failed to register connection device
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_write include/linux/instrumented.h:82 [inline]
BUG: KASAN: null-ptr-deref in set_bit include/asm-generic/bitops/instrumented-atomic.h:28 [inline]
BUG: KASAN: null-ptr-deref in l2cap_sock_suspend_cb+0x50/0xb4 net/bluetooth/l2cap_sock.c:1748
Write of size 8 at addr 0000000000000590 by task kworker/u9:4/6582

CPU: 1 UID: 0 PID: 6582 Comm: kworker/u9:4 Not tainted syzkaller #0 PREEMPT 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025
Workqueue: hci0 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:485
 kasan_report+0xb0/0x110 mm/kasan/report.c:595
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:200
 __kasan_check_write+0x20/0x30 mm/kasan/shadow.c:37
 instrument_atomic_write include/linux/instrumented.h:82 [inline]
 set_bit include/asm-generic/bitops/instrumented-atomic.h:28 [inline]
 l2cap_sock_suspend_cb+0x50/0xb4 net/bluetooth/l2cap_sock.c:1748
 l2cap_chan_ready net/bluetooth/l2cap_core.c:1258 [inline]
 l2cap_le_start+0x900/0x10c0 net/bluetooth/l2cap_core.c:1376
 l2cap_conn_ready net/bluetooth/l2cap_core.c:1629 [inline]
 l2cap_connect_cfm+0x558/0xdb0 net/bluetooth/l2cap_core.c:7305
 hci_connect_cfm+0x98/0x134 include/net/bluetooth/hci_core.h:2131
 le_conn_complete_evt+0xc3c/0x1064 net/bluetooth/hci_event.c:5821
 hci_le_conn_complete_evt+0x114/0x410 net/bluetooth/hci_event.c:5847
 hci_le_meta_evt+0x2dc/0x500 net/bluetooth/hci_event.c:7408
 hci_event_func net/bluetooth/hci_event.c:7716 [inline]
 hci_event_packet+0x6bc/0xf50 net/bluetooth/hci_event.c:7773
 hci_rx_work+0x300/0xd80 net/bluetooth/hci_core.c:4076
 process_one_work+0x7c0/0x1558 kernel/workqueue.c:3257
 process_scheduled_works kernel/workqueue.c:3340 [inline]
 worker_thread+0x958/0xed8 kernel/workqueue.c:3421
 kthread+0x5fc/0x75c kernel/kthread.c:463
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844
==================================================================
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000590
Mem abort info:
  ESR = 0x0000000096000006
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x06: level 2 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000
  CM = 0, WnR = 0, TnD = 0, TagAccess = 0
  GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=000000011b91f000
[0000000000000590] pgd=0800000117ff7403, p4d=0800000117ff7403, pud=080000011505f403, pmd=0000000000000000
Internal error: Oops: 0000000096000006 [#1]  SMP
Modules linked in:
CPU: 1 UID: 0 PID: 6582 Comm: kworker/u9:4 Tainted: G    B               syzkaller #0 PREEMPT 
Tainted: [B]=BAD_PAGE
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025
Workqueue: hci0 hci_rx_work
pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
pc : __lse_atomic64_or arch/arm64/include/asm/atomic_lse.h:132 [inline]
pc : arch_atomic64_or arch/arm64/include/asm/atomic.h:65 [inline]
pc : raw_atomic64_or include/linux/atomic/atomic-arch-fallback.h:3798 [inline]
pc : raw_atomic_long_or include/linux/atomic/atomic-long.h:1069 [inline]
pc : arch_set_bit include/asm-generic/bitops/atomic.h:18 [inline]
pc : set_bit include/asm-generic/bitops/instrumented-atomic.h:29 [inline]
pc : l2cap_sock_suspend_cb+0x5c/0xb4 net/bluetooth/l2cap_sock.c:1748
lr : __lse_atomic64_or arch/arm64/include/asm/atomic_lse.h:132 [inline]
lr : arch_atomic64_or arch/arm64/include/asm/atomic.h:65 [inline]
lr : raw_atomic64_or include/linux/atomic/atomic-arch-fallback.h:3798 [inline]
lr : raw_atomic_long_or include/linux/atomic/atomic-long.h:1069 [inline]
lr : arch_set_bit include/asm-generic/bitops/atomic.h:18 [inline]
lr : set_bit include/asm-generic/bitops/instrumented-atomic.h:29 [inline]
lr : l2cap_sock_suspend_cb+0x58/0xb4 net/bluetooth/l2cap_sock.c:1748
sp : ffff8000a37e7410
x29: ffff8000a37e7410 x28: ffff8000a37e7480 x27: 1fffe0001bf4aa04
x26: 1fffe0001bf4aa02 x25: 1fffe0001bf4aa00 x24: ffff7000146fce90
x23: 0000000000000002 x22: dfff800000000000 x21: dfff800000000000
x20: 0000000000000590 x19: 0000000000000000 x18: 00000000ffffffff
x17: 3d3d3d3d3d3d3d3d x16: ffff800082e5c71c x15: 0000000000000001
x14: 1ffff0001261fb18 x13: 0000000000000000 x12: 0000000000000000
x11: 0000000000100000 x10: 00000000000140d6 x9 : ffff8000aebbb000
x8 : 0000000000000002 x7 : 0000000000000001 x6 : ffff800080575c38
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000803c8888
x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
 __lse_atomic64_or arch/arm64/include/asm/atomic_lse.h:-1 [inline] (P)
 arch_atomic64_or arch/arm64/include/asm/atomic.h:65 [inline] (P)
 raw_atomic64_or include/linux/atomic/atomic-arch-fallback.h:3798 [inline] (P)
 raw_atomic_long_or include/linux/atomic/atomic-long.h:1069 [inline] (P)
 arch_set_bit include/asm-generic/bitops/atomic.h:18 [inline] (P)
 set_bit include/asm-generic/bitops/instrumented-atomic.h:29 [inline] (P)
 l2cap_sock_suspend_cb+0x5c/0xb4 net/bluetooth/l2cap_sock.c:1748 (P)
 l2cap_chan_ready net/bluetooth/l2cap_core.c:1258 [inline]
 l2cap_le_start+0x900/0x10c0 net/bluetooth/l2cap_core.c:1376
 l2cap_conn_ready net/bluetooth/l2cap_core.c:1629 [inline]
 l2cap_connect_cfm+0x558/0xdb0 net/bluetooth/l2cap_core.c:7305
 hci_connect_cfm+0x98/0x134 include/net/bluetooth/hci_core.h:2131
 le_conn_complete_evt+0xc3c/0x1064 net/bluetooth/hci_event.c:5821
 hci_le_conn_complete_evt+0x114/0x410 net/bluetooth/hci_event.c:5847
 hci_le_meta_evt+0x2dc/0x500 net/bluetooth/hci_event.c:7408
 hci_event_func net/bluetooth/hci_event.c:7716 [inline]
 hci_event_packet+0x6bc/0xf50 net/bluetooth/hci_event.c:7773
 hci_rx_work+0x300/0xd80 net/bluetooth/hci_core.c:4076
 process_one_work+0x7c0/0x1558 kernel/workqueue.c:3257
 process_scheduled_works kernel/workqueue.c:3340 [inline]
 worker_thread+0x958/0xed8 kernel/workqueue.c:3421
 kthread+0x5fc/0x75c kernel/kthread.c:463
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844
Code: 977e10e8 d503201f 977e1008 52800048 (f828329f) 
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
   0:	977e10e8 	bl	0xfffffffffdf843a0
   4:	d503201f 	nop
   8:	977e1008 	bl	0xfffffffffdf84028
   c:	52800048 	mov	w8, #0x2                   	// #2
* 10:	f828329f 	stset	x8, [x20] <-- trapping instruction

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/19 02:37 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8f0b4cce4481 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: null-ptr-deref Write in l2cap_sock_suspend_cb
2025/12/15 16:02 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8f0b4cce4481 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: null-ptr-deref Write in l2cap_sock_suspend_cb
2025/12/05 12:10 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 05c93f3395ed d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: null-ptr-deref Write in l2cap_sock_suspend_cb
* Struck through repros no longer work on HEAD.