================================================================== BUG: KASAN: use-after-free in ex_handler_refcount+0x164/0x1a0 arch/x86/mm/extable.c:49 Write of size 4 at addr ffff88808f782a18 by task kworker/0:2/2827 CPU: 0 PID: 2827 Comm: kworker/0:2 Not tainted 4.14.172-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+0x13e/0x194 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1e2 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2ae mm/kasan/report.c:393 ex_handler_refcount+0x164/0x1a0 arch/x86/mm/extable.c:49 fixup_exception+0x8a/0xc3 arch/x86/mm/extable.c:197 do_trap_no_signal arch/x86/kernel/traps.c:208 [inline] do_trap+0x72/0x230 arch/x86/kernel/traps.c:257 do_error_trap+0x132/0x2d0 arch/x86/kernel/traps.c:301 invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:963 RIP: 0010:inat_get_avx_attribute+0x5986/0x7953 RSP: 0018:ffff88809e8c7c98 EFLAGS: 00010297 RAX: ffff88809e81a000 RBX: ffff88808f782a00 RCX: ffff88808f782a18 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88808f782a00 RBP: ffff88808f782a00 R08: 0000000000007d6d R09: ffffffff8a09a428 R10: ffff88809e81a8a8 R11: ffff88809e81a000 R12: ffff88809e8c7dd8 R13: ffff88809ac3b680 R14: ffff88809efdc600 R15: ffff8880aea2acc0 do_enable_set+0x466/0x7f0 net/bluetooth/6lowpan.c:1087 process_one_work+0x813/0x1540 kernel/workqueue.c:2114 worker_thread+0x5d1/0x1070 kernel/workqueue.c:2248 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 2827: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529 kmem_cache_alloc_trace+0x14d/0x7b0 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+0xc/0xd0 net/bluetooth/6lowpan.c:652 bt_6lowpan_listen net/bluetooth/6lowpan.c:971 [inline] do_enable_set+0x493/0x7f0 net/bluetooth/6lowpan.c:1090 process_one_work+0x813/0x1540 kernel/workqueue.c:2114 worker_thread+0x5d1/0x1070 kernel/workqueue.c:2248 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Freed by task 2818: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcb/0x260 mm/slab.c:3815 kref_put include/linux/kref.h:70 [inline] l2cap_chan_put+0x27/0x30 net/bluetooth/l2cap_core.c:493 do_enable_set+0x466/0x7f0 net/bluetooth/6lowpan.c:1087 process_one_work+0x813/0x1540 kernel/workqueue.c:2114 worker_thread+0x5d1/0x1070 kernel/workqueue.c:2248 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 ffff88808f782a00 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 24 bytes inside of 2048-byte region [ffff88808f782a00, ffff88808f783200) The buggy address belongs to the page: page:ffffea00023de080 count:1 mapcount:0 mapping:ffff88808f782180 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff88808f782180 0000000000000000 0000000100000003 raw: ffffea00023dbba0 ffffea000251a320 ffff88812fe56c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808f782900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808f782980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808f782a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808f782a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808f782b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================