================================================================== BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: null-ptr-deref in atomic_fetch_sub_release include/asm-generic/atomic-instrumented.h:220 [inline] BUG: KASAN: null-ptr-deref in __refcount_sub_and_test include/linux/refcount.h:272 [inline] BUG: KASAN: null-ptr-deref in __refcount_dec_and_test include/linux/refcount.h:315 [inline] BUG: KASAN: null-ptr-deref in refcount_dec_and_test include/linux/refcount.h:333 [inline] BUG: KASAN: null-ptr-deref in kref_put include/linux/kref.h:64 [inline] BUG: KASAN: null-ptr-deref in l2cap_chan_put+0x1c/0x1c0 net/bluetooth/l2cap_core.c:504 Write of size 4 at addr 0000000000000018 by task kworker/0:0/5 CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.13.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events l2cap_chan_timeout Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x10c/0x14b lib/dump_stack.c:120 __kasan_report mm/kasan/report.c:423 [inline] kasan_report.cold+0x5f/0xd8 mm/kasan/report.c:436 check_region_inline mm/kasan/generic.c:180 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:186 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_fetch_sub_release include/asm-generic/atomic-instrumented.h:220 [inline] __refcount_sub_and_test include/linux/refcount.h:272 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] kref_put include/linux/kref.h:64 [inline] l2cap_chan_put+0x1c/0x1c0 net/bluetooth/l2cap_core.c:504 l2cap_sock_kill+0x95/0x110 net/bluetooth/l2cap_sock.c:1225 l2cap_chan_timeout+0x171/0x3a0 net/bluetooth/l2cap_core.c:438 process_one_work+0x84c/0x13b0 kernel/workqueue.c:2276 worker_thread+0x598/0xf80 kernel/workqueue.c:2422 kthread+0x36f/0x450 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 ================================================================== BUG: kernel NULL pointer dereference, address: 0000000000000018 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP KASAN CPU: 0 PID: 5 Comm: kworker/0:0 Tainted: G B 5.13.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events l2cap_chan_timeout RIP: 0010:arch_atomic_fetch_sub arch/x86/include/asm/atomic.h:190 [inline] RIP: 0010:atomic_fetch_sub_release include/asm-generic/atomic-instrumented.h:221 [inline] RIP: 0010:__refcount_sub_and_test include/linux/refcount.h:272 [inline] RIP: 0010:__refcount_dec_and_test include/linux/refcount.h:315 [inline] RIP: 0010:refcount_dec_and_test include/linux/refcount.h:333 [inline] RIP: 0010:kref_put include/linux/kref.h:64 [inline] RIP: 0010:l2cap_chan_put+0x21/0x1c0 net/bluetooth/l2cap_core.c:504 Code: d5 be 0f fb eb ad 0f 1f 00 41 56 be 04 00 00 00 41 55 41 54 4c 8d 67 18 55 48 89 fd 4c 89 e7 53 e8 34 c2 0f fb b8 ff ff ff ff 0f c1 45 18 83 f8 01 74 11 85 c0 0f 8e 2b 01 00 00 5b 5d 41 5c RSP: 0018:ffffc9000006fca0 EFLAGS: 00010246 RAX: 00000000ffffffff RBX: ffff8881034da110 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000004 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: fffffbfff12b24a4 R11: 6e696c6261736944 R12: 0000000000000018 R13: ffff8881034da4b8 R14: ffffffff8889bca0 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8881f6400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000018 CR3: 000000010d18a000 CR4: 0000000000350ef0 Call Trace: l2cap_sock_kill+0x95/0x110 net/bluetooth/l2cap_sock.c:1225 l2cap_chan_timeout+0x171/0x3a0 net/bluetooth/l2cap_core.c:438 process_one_work+0x84c/0x13b0 kernel/workqueue.c:2276 worker_thread+0x598/0xf80 kernel/workqueue.c:2422 kthread+0x36f/0x450 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Modules linked in: CR2: 0000000000000018 ---[ end trace 46c6f91767477cea ]--- RIP: 0010:arch_atomic_fetch_sub arch/x86/include/asm/atomic.h:190 [inline] RIP: 0010:atomic_fetch_sub_release include/asm-generic/atomic-instrumented.h:221 [inline] RIP: 0010:__refcount_sub_and_test include/linux/refcount.h:272 [inline] RIP: 0010:__refcount_dec_and_test include/linux/refcount.h:315 [inline] RIP: 0010:refcount_dec_and_test include/linux/refcount.h:333 [inline] RIP: 0010:kref_put include/linux/kref.h:64 [inline] RIP: 0010:l2cap_chan_put+0x21/0x1c0 net/bluetooth/l2cap_core.c:504 Code: d5 be 0f fb eb ad 0f 1f 00 41 56 be 04 00 00 00 41 55 41 54 4c 8d 67 18 55 48 89 fd 4c 89 e7 53 e8 34 c2 0f fb b8 ff ff ff ff 0f c1 45 18 83 f8 01 74 11 85 c0 0f 8e 2b 01 00 00 5b 5d 41 5c RSP: 0018:ffffc9000006fca0 EFLAGS: 00010246 RAX: 00000000ffffffff RBX: ffff8881034da110 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000004 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: fffffbfff12b24a4 R11: 6e696c6261736944 R12: 0000000000000018 R13: ffff8881034da4b8 R14: ffffffff8889bca0 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8881f6400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000018 CR3: 000000010d18a000 CR4: 0000000000350ef0