================================================================== BUG: KASAN: use-after-free in ex_handler_refcount+0x18d/0x1c0 arch/x86/mm/extable.c:49 Write of size 4 at addr ffff88804cff2098 by task kworker/1:1/24 CPU: 1 PID: 24 Comm: kworker/1:1 Not tainted 4.19.102-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 __asan_report_store4_noabort+0x17/0x20 mm/kasan/report.c:437 ex_handler_refcount+0x18d/0x1c0 arch/x86/mm/extable.c:49 fixup_exception+0x8b/0xb9 arch/x86/mm/extable.c:197 do_trap_no_signal arch/x86/kernel/traps.c:209 [inline] do_trap+0x65/0x250 arch/x86/kernel/traps.c:258 do_error_trap+0x187/0x360 arch/x86/kernel/traps.c:303 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:1037 RIP: 0010:csum_partial_copy_generic+0x6765/0x87ce Code: 8d 80 00 00 00 0f 0b 49 8d 8c 24 80 00 00 00 0f 0b 49 8d 8c 24 80 00 00 00 0f 0b 48 8d 0b 0f 0b 49 8d 0c 24 0f 0b 48 8d 4b 18 <0f> 0b 48 8d 8b b8 02 00 00 0f 0b 49 8d 8c 24 b8 02 00 00 0f 0b 48 RSP: 0018:ffff8880a997fc20 EFLAGS: 00010297 RAX: ffff8880a9970640 RBX: ffff88804cff2080 RCX: ffff88804cff2098 RDX: 0000000000000000 RSI: ffffffff86947fcf RDI: ffff88804cff2080 RBP: ffff8880a997fc30 R08: ffff8880a9970640 R09: fffffbfff1363255 R10: fffffbfff1363254 R11: ffffffff89b192a3 R12: ffff88804cff2098 R13: ffff88804cff2080 R14: dead000000000200 R15: ffff8880a997fca8 do_enable_set+0x541/0x950 net/bluetooth/6lowpan.c:1087 process_one_work+0x989/0x1750 kernel/workqueue.c:2153 worker_thread+0x98/0xe40 kernel/workqueue.c:2296 kthread+0x354/0x420 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 24: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531 kmem_cache_alloc_trace+0x152/0x760 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] l2cap_chan_create+0x45/0x390 net/bluetooth/l2cap_core.c:441 chan_create+0x10/0xe0 net/bluetooth/6lowpan.c:652 bt_6lowpan_listen net/bluetooth/6lowpan.c:971 [inline] do_enable_set+0x579/0x950 net/bluetooth/6lowpan.c:1090 process_one_work+0x989/0x1750 kernel/workqueue.c:2153 worker_thread+0x98/0xe40 kernel/workqueue.c:2296 kthread+0x354/0x420 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Freed by task 5: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x220 mm/slab.c:3822 l2cap_chan_destroy+0x14f/0x1c0 net/bluetooth/l2cap_core.c:479 kref_put include/linux/kref.h:70 [inline] l2cap_chan_put+0x3a/0x50 net/bluetooth/l2cap_core.c:493 do_enable_set+0x541/0x950 net/bluetooth/6lowpan.c:1087 process_one_work+0x989/0x1750 kernel/workqueue.c:2153 worker_thread+0x98/0xe40 kernel/workqueue.c:2296 kthread+0x354/0x420 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff88804cff2080 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 24 bytes inside of 2048-byte region [ffff88804cff2080, ffff88804cff2880) The buggy address belongs to the page: page:ffffea000133fc80 count:1 mapcount:0 mapping:ffff88812c31cc40 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea0001339b08 ffffea000133ef08 ffff88812c31cc40 raw: 0000000000000000 ffff88804cff2080 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804cff1f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804cff2000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88804cff2080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804cff2100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804cff2180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================