================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:197 [inline] BUG: KASAN: use-after-free in lockdep_register_key+0x3b9/0x490 kernel/locking/lockdep.c:1023 Read of size 8 at addr ffff8880a78b9198 by task syz-executor.2/24828 CPU: 1 PID: 24828 Comm: syz-executor.2 Not tainted 5.0.0-next-20190306 #4 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 __read_once_size include/linux/compiler.h:197 [inline] lockdep_register_key+0x3b9/0x490 kernel/locking/lockdep.c:1023 wq_init_lockdep kernel/workqueue.c:3444 [inline] alloc_workqueue+0x427/0xe70 kernel/workqueue.c:4263 hci_register_dev+0x209/0x860 net/bluetooth/hci_core.c:3294 hci_uart_register_dev drivers/bluetooth/hci_ldisc.c:676 [inline] hci_uart_set_proto drivers/bluetooth/hci_ldisc.c:700 [inline] hci_uart_tty_ioctl+0x766/0xb00 drivers/bluetooth/hci_ldisc.c:754 tty_ioctl+0xac9/0x14d0 drivers/tty/tty_io.c:2664 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xd6e/0x1390 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457f29 Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f664fe1fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457f29 RDX: 0000000000000009 RSI: 00000000400455c8 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f664fe206d4 R13: 00000000004c07b8 R14: 00000000004d24f0 R15: 00000000ffffffff Allocated by task 23741: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_kmalloc mm/kasan/common.c:497 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:511 __do_kmalloc mm/slab.c:3726 [inline] __kmalloc+0x15c/0x740 mm/slab.c:3735 kmalloc include/linux/slab.h:550 [inline] kzalloc include/linux/slab.h:740 [inline] alloc_workqueue+0x13c/0xe70 kernel/workqueue.c:4236 hci_register_dev+0x1b8/0x860 net/bluetooth/hci_core.c:3288 hci_uart_register_dev drivers/bluetooth/hci_ldisc.c:676 [inline] hci_uart_set_proto drivers/bluetooth/hci_ldisc.c:700 [inline] hci_uart_tty_ioctl+0x766/0xb00 drivers/bluetooth/hci_ldisc.c:754 tty_ioctl+0xac9/0x14d0 drivers/tty/tty_io.c:2664 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xd6e/0x1390 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 23741: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:459 kasan_slab_free+0xe/0x10 mm/kasan/common.c:467 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3821 alloc_workqueue+0xc3e/0xe70 kernel/workqueue.c:4295 hci_register_dev+0x1b8/0x860 net/bluetooth/hci_core.c:3288 hci_uart_register_dev drivers/bluetooth/hci_ldisc.c:676 [inline] hci_uart_set_proto drivers/bluetooth/hci_ldisc.c:700 [inline] hci_uart_tty_ioctl+0x766/0xb00 drivers/bluetooth/hci_ldisc.c:754 tty_ioctl+0xac9/0x14d0 drivers/tty/tty_io.c:2664 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xd6e/0x1390 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a78b9080 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 280 bytes inside of 512-byte region [ffff8880a78b9080, ffff8880a78b9280) The buggy address belongs to the page: page:ffffea00029e2e40 count:1 mapcount:0 mapping:ffff88812c3f0940 index:0xffff8880a78b9800 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00023c5048 ffffea0002624888 ffff88812c3f0940 raw: ffff8880a78b9800 ffff8880a78b9080 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a78b9080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a78b9100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a78b9180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a78b9200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a78b9280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================