syz-executor.2 (12263) used greatest stack depth: 23656 bytes left Bluetooth: hci0 command 0x040f tx timeout netlink: 24 bytes leftover after parsing attributes in process `syz-executor.1'. ================================================================== BUG: KASAN: use-after-free in ex_handler_refcount+0x164/0x1a0 arch/x86/mm/extable.c:49 Write of size 4 at addr ffff8880a3e6e498 by task syz-executor.0/11909 CPU: 0 PID: 11909 Comm: syz-executor.0 Not tainted 4.14.195-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 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_store4_noabort+0x68/0x70 mm/kasan/report.c:434 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+0x61/0x250 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:964 RIP: 0010:inat_get_avx_attribute+0x5307/0x6aaf RSP: 0018:ffff8880a5b4f9e8 EFLAGS: 00010297 RAX: ffff8880928c8640 RBX: ffff88808a0872c0 RCX: ffff8880a3e6e498 RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff8880a3e6e480 RBP: ffff8880a3e6e480 R08: 0000000000000000 R09: 0000000000000003 R10: 0000000000000000 R11: ffff8880928c8640 R12: ffff88808a0872c0 R13: ffff8880976ae1d0 R14: ffffffff850f24a4 R15: ffff888098357b88 l2cap_sock_destruct+0x47/0xf0 net/bluetooth/l2cap_sock.c:1489 __sk_destruct+0x49/0x6e0 net/core/sock.c:1557 sk_destruct net/core/sock.c:1597 [inline] __sk_free+0xd9/0x2d0 net/core/sock.c:1605 sock_wfree+0xf3/0x130 net/core/sock.c:1818 skb_release_head_state+0x11e/0x250 net/core/skbuff.c:616 skb_release_all net/core/skbuff.c:629 [inline] __kfree_skb net/core/skbuff.c:645 [inline] kfree_skb+0xae/0x390 net/core/skbuff.c:663 skb_queue_purge+0x14/0x30 net/core/skbuff.c:2855 hci_chan_del+0x11c/0x180 net/bluetooth/hci_conn.c:1561 l2cap_conn_del+0x417/0x670 net/bluetooth/l2cap_core.c:1736 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:7435 [inline] l2cap_disconn_cfm+0x6b/0x80 net/bluetooth/l2cap_core.c:7428 hci_disconn_cfm include/net/bluetooth/hci_core.h:1226 [inline] hci_conn_hash_flush+0x114/0x220 net/bluetooth/hci_conn.c:1376 hci_dev_do_close+0x542/0xc50 net/bluetooth/hci_core.c:1620 hci_unregister_dev+0x170/0x7a0 net/bluetooth/hci_core.c:3191 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:354 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xa08/0x27f0 kernel/exit.c:865 do_group_exit+0x100/0x2e0 kernel/exit.c:962 SYSC_exit_group kernel/exit.c:973 [inline] SyS_exit_group+0x19/0x20 kernel/exit.c:971 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45d5b9 RSP: 002b:00007ffdc7038008 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000045d5b9 RDX: 0000000000416e41 RSI: 00000000016a85f0 RDI: 0000000000000043 RBP: 00000000004c318c R08: 000000000000000b R09: 0000000000000000 R10: 00000000033aa940 R11: 0000000000000246 R12: 000000000000000a R13: 00007ffdc7038150 R14: 0000000000045d65 R15: 00007ffdc7038160 Allocated by task 12269: netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. 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 l2cap_sock_alloc.constprop.0+0x16c/0x210 net/bluetooth/l2cap_sock.c:1606 l2cap_sock_create+0xdd/0x170 net/bluetooth/l2cap_sock.c:1637 bt_sock_create+0x13b/0x280 net/bluetooth/af_bluetooth.c:130 __sock_create+0x303/0x620 net/socket.c:1275 sock_create net/socket.c:1315 [inline] SYSC_socket net/socket.c:1345 [inline] SyS_socket+0xd1/0x1b0 net/socket.c:1325 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 11909: 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 l2cap_conn_del+0x3ab/0x670 net/bluetooth/l2cap_core.c:1731 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:7435 [inline] l2cap_disconn_cfm+0x6b/0x80 net/bluetooth/l2cap_core.c:7428 hci_disconn_cfm include/net/bluetooth/hci_core.h:1226 [inline] hci_conn_hash_flush+0x114/0x220 net/bluetooth/hci_conn.c:1376 hci_dev_do_close+0x542/0xc50 net/bluetooth/hci_core.c:1620 hci_unregister_dev+0x170/0x7a0 net/bluetooth/hci_core.c:3191 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:354 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xa08/0x27f0 kernel/exit.c:865 do_group_exit+0x100/0x2e0 kernel/exit.c:962 SYSC_exit_group kernel/exit.c:973 [inline] SyS_exit_group+0x19/0x20 kernel/exit.c:971 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8880a3e6e480 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 24 bytes inside of 2048-byte region [ffff8880a3e6e480, ffff8880a3e6ec80) The buggy address belongs to the page: page:ffffea00028f9b80 count:1 mapcount:0 mapping:ffff8880a3e6e480 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff8880a3e6e480 0000000000000000 0000000100000003 raw: ffffea000248a5a0 ffffea00025f80a0 ffff88812fe52c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a3e6e380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a3e6e400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a3e6e480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a3e6e500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a3e6e580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================