================================================================== 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 ffff8880895eae58 by task syz-executor.5/24732 CPU: 0 PID: 24732 Comm: syz-executor.5 Not tainted 5.0.0-next-20190305 #3 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 xfs_init_mount_workqueues+0x5f/0x660 fs/xfs/xfs_super.c:836 xfs_fs_fill_super+0x749/0x1670 fs/xfs/xfs_super.c:1658 mount_bdev+0x307/0x3c0 fs/super.c:1346 xfs_fs_mount+0x35/0x40 fs/xfs/xfs_super.c:1834 legacy_get_tree+0xf2/0x200 fs/fs_context.c:584 vfs_get_tree+0x123/0x450 fs/super.c:1481 do_new_mount fs/namespace.c:2622 [inline] do_mount+0x1436/0x2c40 fs/namespace.c:2942 ksys_mount+0xdb/0x150 fs/namespace.c:3151 __do_sys_mount fs/namespace.c:3165 [inline] __se_sys_mount fs/namespace.c:3162 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3162 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45a99a Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 2d 8e fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 0a 8e fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f2db7b0da88 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f2db7b0db30 RCX: 000000000045a99a RDX: 00007f2db7b0dad0 RSI: 0000000020000080 RDI: 00007f2db7b0daf0 RBP: 0000000020000080 R08: 00007f2db7b0db30 R09: 00007f2db7b0dad0 R10: 0000000000000080 R11: 0000000000000206 R12: 0000000000000003 R13: 0000000000000080 R14: 00000000004dbee0 R15: 00000000ffffffff Allocated by task 14487: 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 14487: 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 __udp4_lib_rcv+0x1fbe/0x2c50 net/ipv4/udp.c:2329 udp_rcv+0x22/0x30 net/ipv4/udp.c:2482 ip_protocol_deliver_rcu+0x60/0x8f0 net/ipv4/ip_input.c:208 ip_local_deliver_finish+0x23b/0x390 net/ipv4/ip_input.c:234 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ip_local_deliver+0x1e9/0x520 net/ipv4/ip_input.c:255 dst_input include/net/dst.h:450 [inline] ip_rcv_finish+0x1e1/0x300 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ip_rcv+0xe8/0x3f0 net/ipv4/ip_input.c:524 __netif_receive_skb_one_core+0x115/0x1a0 net/core/dev.c:4973 __netif_receive_skb+0x2c/0x1c0 net/core/dev.c:5083 process_backlog+0x206/0x750 net/core/dev.c:5923 napi_poll net/core/dev.c:6346 [inline] net_rx_action+0x4fa/0x1070 net/core/dev.c:6412 __do_softirq+0x266/0x95a kernel/softirq.c:293 The buggy address belongs to the object at ffff8880895ead40 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 280 bytes inside of 512-byte region [ffff8880895ead40, ffff8880895eaf40) The buggy address belongs to the page: page:ffffea0002257a80 count:1 mapcount:0 mapping:ffff88812c3f0940 index:0xffff8880895ea840 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0002413a88 ffffea0001071c08 ffff88812c3f0940 raw: ffff8880895ea840 ffff8880895ea0c0 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880895ead00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880895ead80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880895eae00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880895eae80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880895eaf00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================