================================================================== BUG: KASAN: use-after-free in l2cap_chan_close+0x4fb/0x770 net/bluetooth/l2cap_core.c:727 Read of size 1 at addr ffff88809b6da960 by task kworker/0:2/2874 CPU: 0 PID: 2874 Comm: kworker/0:2 Not tainted 4.14.193-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:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load1_noabort+0x68/0x70 mm/kasan/report.c:427 l2cap_chan_close+0x4fb/0x770 net/bluetooth/l2cap_core.c:727 do_enable_set+0x473/0x8a0 net/bluetooth/6lowpan.c:1086 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 2755: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x131/0x3d0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] l2cap_chan_create+0x3e/0x3c0 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+0x4ac/0x8a0 net/bluetooth/6lowpan.c:1090 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Freed by task 2755: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 l2cap_chan_destroy net/bluetooth/l2cap_core.c:479 [inline] kref_put include/linux/kref.h:70 [inline] l2cap_chan_put+0x152/0x1b0 net/bluetooth/l2cap_core.c:493 do_enable_set+0x47f/0x8a0 net/bluetooth/6lowpan.c:1087 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff88809b6da940 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 32 bytes inside of 2048-byte region [ffff88809b6da940, ffff88809b6db140) The buggy address belongs to the page: page:ffffea00026db680 count:1 mapcount:0 mapping:ffff88809b6da0c0 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff88809b6da0c0 0000000000000000 0000000100000003 raw: ffffea00025c2620 ffffea00025ca4a0 ffff88812fe52c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809b6da800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809b6da880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88809b6da900: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff88809b6da980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809b6daa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================