================================================================== BUG: KASAN: use-after-free in l2cap_chan_close+0x58b/0x820 net/bluetooth/l2cap_core.c:727 Read of size 1 at addr ffff8880a47d71a0 by task kworker/0:3/6151 CPU: 0 PID: 6151 Comm: kworker/0:3 Not tainted 4.19.137-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events do_enable_set Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2fe lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1c7 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load1_noabort+0x88/0x90 mm/kasan/report.c:430 l2cap_chan_close+0x58b/0x820 net/bluetooth/l2cap_core.c:727 do_enable_set+0x4e3/0x975 net/bluetooth/6lowpan.c:1086 process_one_work+0x864/0x1570 kernel/workqueue.c:2155 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298 kthread+0x30b/0x410 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 2763: kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] l2cap_chan_create+0x40/0x380 net/bluetooth/l2cap_core.c:441 chan_create net/bluetooth/6lowpan.c:652 [inline] bt_6lowpan_listen net/bluetooth/6lowpan.c:971 [inline] do_enable_set+0x525/0x975 net/bluetooth/6lowpan.c:1090 process_one_work+0x864/0x1570 kernel/workqueue.c:2155 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298 kthread+0x30b/0x410 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Freed by task 2763: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 l2cap_chan_destroy net/bluetooth/l2cap_core.c:479 [inline] kref_put include/linux/kref.h:70 [inline] l2cap_chan_put+0x16b/0x1c0 net/bluetooth/l2cap_core.c:493 do_enable_set+0x4ef/0x975 net/bluetooth/6lowpan.c:1087 process_one_work+0x864/0x1570 kernel/workqueue.c:2155 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298 kthread+0x30b/0x410 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff8880a47d7180 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 32 bytes inside of 2048-byte region [ffff8880a47d7180, ffff8880a47d7980) The buggy address belongs to the page: page:ffffea000291f580 count:1 mapcount:0 mapping:ffff88812c39cc40 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea0002903f08 ffffea000290ab88 ffff88812c39cc40 raw: 0000000000000000 ffff8880a47d6080 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a47d7080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a47d7100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a47d7180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a47d7200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a47d7280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================