================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xe0/0xf0 lib/list_debug.c:51 Read of size 8 at addr ffff8880b0b31320 by task kworker/u5:0/1717 CPU: 1 PID: 1717 Comm: kworker/u5:0 Not tainted 4.19.201-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: hci5 hci_rx_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 __list_del_entry_valid+0xe0/0xf0 lib/list_debug.c:51 __list_del_entry include/linux/list.h:117 [inline] list_del include/linux/list.h:125 [inline] klist_release lib/klist.c:190 [inline] kref_put include/linux/kref.h:70 [inline] klist_dec_and_del+0x97/0x480 lib/klist.c:207 klist_put+0x7a/0x150 lib/klist.c:218 device_del+0x162/0xaf0 drivers/base/core.c:2320 hci_conn_del_sysfs+0xdc/0x180 net/bluetooth/hci_sysfs.c:78 hci_conn_cleanup+0x24b/0x550 net/bluetooth/hci_conn.c:128 hci_conn_del+0x2a0/0x780 net/bluetooth/hci_conn.c:611 hci_disconn_complete_evt net/bluetooth/hci_event.c:2678 [inline] hci_event_packet+0x11ca/0x7e20 net/bluetooth/hci_event.c:5787 hci_rx_work+0x4ad/0xc70 net/bluetooth/hci_core.c:4366 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 1717: kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] device_private_init drivers/base/core.c:2035 [inline] device_add+0xe5a/0x16d0 drivers/base/core.c:2080 hci_conn_add_sysfs+0x97/0x1a0 net/bluetooth/hci_sysfs.c:53 hci_conn_complete_evt net/bluetooth/hci_event.c:2445 [inline] hci_event_packet+0x2647/0x7e20 net/bluetooth/hci_event.c:5779 hci_rx_work+0x4ad/0xc70 net/bluetooth/hci_core.c:4366 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Freed by task 8154: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 device_add+0x713/0x16d0 drivers/base/core.c:2213 hci_conn_add_sysfs+0x97/0x1a0 net/bluetooth/hci_sysfs.c:53 hci_sync_conn_complete_evt.isra.0+0x9e9/0xca0 net/bluetooth/hci_event.c:4091 hci_event_packet+0x391f/0x7e20 net/bluetooth/hci_event.c:5869 hci_rx_work+0x4ad/0xc70 net/bluetooth/hci_core.c:4366 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff8880b0b312c0 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 96 bytes inside of 256-byte region [ffff8880b0b312c0, ffff8880b0b313c0) The buggy address belongs to the page: page:ffffea0002c2cc40 count:1 mapcount:0 mapping:ffff88813bff07c0 index:0xffff8880b0b317c0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002a52608 ffffea0002720248 ffff88813bff07c0 raw: ffff8880b0b317c0 ffff8880b0b31040 000000010000000b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b0b31200: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc ffff8880b0b31280: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8880b0b31300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880b0b31380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880b0b31400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================