================================================================== 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+0x28/0x230 net/bluetooth/l2cap_core.c:502 Write of size 4 at addr 0000000000000018 by task kworker/1:7/7409 CPU: 1 PID: 7409 Comm: kworker/1:7 Not tainted 5.12.0-rc3-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+0x185/0x1e4 lib/dump_stack.c:120 __kasan_report mm/kasan/report.c:403 [inline] kasan_report.cold+0x5f/0xd8 mm/kasan/report.c:416 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+0x28/0x230 net/bluetooth/l2cap_core.c:502 l2cap_sock_kill+0xbd/0x180 net/bluetooth/l2cap_sock.c:1217 l2cap_chan_timeout+0x1c1/0x450 net/bluetooth/l2cap_core.c:438 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:292 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: 1 PID: 7409 Comm: kworker/1:7 Tainted: G B 5.12.0-rc3-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+0x28/0x230 net/bluetooth/l2cap_core.c:502 Code: 66 90 41 57 41 56 41 55 41 54 55 48 89 fd 53 4c 8d 65 18 bb ff ff ff ff e8 25 8e 47 fa be 04 00 00 00 4c 89 e7 e8 68 f6 8a fa 0f c1 5d 18 bf 01 00 00 00 89 de e8 77 92 47 fa 83 fb 01 74 3b RSP: 0018:ffffc900046d7c88 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffff817be3c1 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff817be3a8 R11: 0000000000000000 R12: 0000000000000018 R13: ffff88811a521000 R14: ffff88811a5214b8 R15: ffff8881f6335e00 FS: 0000000000000000(0000) GS:ffff8881f6300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000018 CR3: 000000011bb07000 CR4: 0000000000350ee0 Call Trace: l2cap_sock_kill+0xbd/0x180 net/bluetooth/l2cap_sock.c:1217 l2cap_chan_timeout+0x1c1/0x450 net/bluetooth/l2cap_core.c:438 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Modules linked in: CR2: 0000000000000018 ---[ end trace 2236ba913d0bfece ]--- 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+0x28/0x230 net/bluetooth/l2cap_core.c:502 Code: 66 90 41 57 41 56 41 55 41 54 55 48 89 fd 53 4c 8d 65 18 bb ff ff ff ff e8 25 8e 47 fa be 04 00 00 00 4c 89 e7 e8 68 f6 8a fa 0f c1 5d 18 bf 01 00 00 00 89 de e8 77 92 47 fa 83 fb 01 74 3b RSP: 0018:ffffc900046d7c88 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffff817be3c1 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff817be3a8 R11: 0000000000000000 R12: 0000000000000018 R13: ffff88811a521000 R14: ffff88811a5214b8 R15: ffff8881f6335e00 FS: 0000000000000000(0000) GS:ffff8881f6300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000018 CR3: 000000011bb07000 CR4: 0000000000350ee0