================================================================== 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 ffff88808d7d2118 by task syz-executor.0/3134 CPU: 0 PID: 3134 Comm: syz-executor.0 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+0x1b8/0x860 net/bluetooth/hci_core.c:3288 __vhci_create_device+0x2d0/0x5a0 drivers/bluetooth/hci_vhci.c:139 vhci_create_device drivers/bluetooth/hci_vhci.c:163 [inline] vhci_get_user drivers/bluetooth/hci_vhci.c:219 [inline] vhci_write+0x2d0/0x470 drivers/bluetooth/hci_vhci.c:299 call_write_iter include/linux/fs.h:1863 [inline] new_sync_write+0x4c7/0x760 fs/read_write.c:474 __vfs_write+0xe4/0x110 fs/read_write.c:487 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0xea/0x1f0 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 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:00007f6c354edc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457f29 RDX: 0000000000000002 RSI: 00000000200003c0 RDI: 0000000000000004 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f6c354ee6d4 R13: 00000000004c759c R14: 00000000004dd1e8 R15: 00000000ffffffff Allocated by task 32737: 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_node mm/slab.c:3686 [inline] __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3700 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:140 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:208 alloc_skb include/linux/skbuff.h:1011 [inline] alloc_skb_with_frags+0x93/0x580 net/core/skbuff.c:5287 sock_alloc_send_pskb+0x72d/0x8a0 net/core/sock.c:2220 sock_alloc_send_skb+0x32/0x40 net/core/sock.c:2237 __ip_append_data.isra.0+0x19a4/0x2dd0 net/ipv4/ip_output.c:998 ip_make_skb+0x249/0x2c0 net/ipv4/ip_output.c:1531 udp_sendmsg+0x1db0/0x2820 net/ipv4/udp.c:1183 udpv6_sendmsg+0x13a4/0x28d0 net/ipv6/udp.c:1289 inet_sendmsg+0x147/0x5d0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xdd/0x130 net/socket.c:632 ___sys_sendmsg+0x3e2/0x930 net/socket.c:2137 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2232 __do_sys_sendmmsg net/socket.c:2261 [inline] __se_sys_sendmmsg net/socket.c:2258 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2258 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: 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 skb_free_head+0x93/0xb0 net/core/skbuff.c:557 skb_release_data+0x576/0x7a0 net/core/skbuff.c:577 skb_release_all+0x4d/0x60 net/core/skbuff.c:631 __kfree_skb net/core/skbuff.c:645 [inline] kfree_skb net/core/skbuff.c:663 [inline] kfree_skb+0xe8/0x390 net/core/skbuff.c:657 udp_destruct_sock+0x300/0x4b0 net/ipv4/udp.c:1509 __sk_destruct+0x55/0x6d0 net/core/sock.c:1699 __rcu_reclaim kernel/rcu/rcu.h:227 [inline] rcu_do_batch kernel/rcu/tree.c:2475 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2788 [inline] rcu_core+0x928/0x1390 kernel/rcu/tree.c:2769 __do_softirq+0x266/0x95a kernel/softirq.c:293 The buggy address belongs to the object at ffff88808d7d2000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 280 bytes inside of 512-byte region [ffff88808d7d2000, ffff88808d7d2200) The buggy address belongs to the page: page:ffffea000235f480 count:1 mapcount:0 mapping:ffff88812c3f0940 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0002435708 ffffea0002a68448 ffff88812c3f0940 raw: 0000000000000000 ffff88808d7d2000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808d7d2000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808d7d2080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808d7d2100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808d7d2180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808d7d2200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================