====================================================== WARNING: possible circular locking dependency detected kobject: 'kvm' (00000000a3800bbf): kobject_uevent_env 4.20.0-rc6-next-20181217+ #172 Not tainted ------------------------------------------------------ syz-executor3/8239 is trying to acquire lock: 000000002547212a (&tbl->lock){+.-.}, at: neigh_change_state+0x1dc/0x7a0 net/core/neighbour.c:141 kobject: 'kvm' (00000000a3800bbf): fill_kobj_path: path = '/devices/virtual/misc/kvm' but task is already holding lock: 00000000de1512fb (&n->lock){++--}, at: __neigh_update+0xe6/0x1eb0 net/core/neighbour.c:1203 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&n->lock){++--}: __raw_write_lock include/linux/rwlock_api_smp.h:210 [inline] _raw_write_lock+0x2d/0x40 kernel/locking/spinlock.c:288 neigh_periodic_work+0x3c0/0xc30 net/core/neighbour.c:894 process_one_work+0xc90/0x1c40 kernel/workqueue.c:2153 worker_thread+0x17f/0x1390 kernel/workqueue.c:2296 kthread+0x35a/0x440 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 -> #0 (&tbl->lock){+.-.}: lock_acquire+0x1ed/0x520 kernel/locking/lockdep.c:3841 __raw_write_lock_bh include/linux/rwlock_api_smp.h:203 [inline] _raw_write_lock_bh+0x31/0x40 kernel/locking/spinlock.c:312 neigh_change_state+0x1dc/0x7a0 net/core/neighbour.c:141 __neigh_update+0x478/0x1eb0 net/core/neighbour.c:1302 neigh_add+0x613/0xd90 net/core/neighbour.c:1899 rtnetlink_rcv_msg+0x46a/0xc20 net/core/rtnetlink.c:4971 netlink_rcv_skb+0x172/0x440 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:4989 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x5a5/0x760 net/netlink/af_netlink.c:1336 netlink_sendmsg+0xa18/0xfc0 net/netlink/af_netlink.c:1917 kobject: 'loop1' (00000000cc0be2c0): kobject_uevent_env sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:632 ___sys_sendmsg+0x7fd/0x930 net/socket.c:2117 __sys_sendmsg+0x11d/0x280 net/socket.c:2155 __do_sys_sendmsg net/socket.c:2164 [inline] __se_sys_sendmsg net/socket.c:2162 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2162 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: kobject: 'loop1' (00000000cc0be2c0): fill_kobj_path: path = '/devices/virtual/block/loop1' Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&n->lock); lock(&tbl->lock); lock(&n->lock); lock(&tbl->lock); *** DEADLOCK *** 2 locks held by syz-executor3/8239: #0: 000000001b7ee1aa (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline] #0: 000000001b7ee1aa (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x40e/0xc20 net/core/rtnetlink.c:4968 #1: 00000000de1512fb (&n->lock){++--}, at: __neigh_update+0xe6/0x1eb0 net/core/neighbour.c:1203 kobject: 'loop2' (00000000983ef0b3): kobject_uevent_env stack backtrace: CPU: 1 PID: 8239 Comm: syz-executor3 Not tainted 4.20.0-rc6-next-20181217+ #172 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+0x244/0x39d lib/dump_stack.c:113 kobject: 'loop2' (00000000983ef0b3): fill_kobj_path: path = '/devices/virtual/block/loop2' print_circular_bug.isra.36.cold.58+0x1bd/0x27d kernel/locking/lockdep.c:1224 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2350 [inline] __lock_acquire+0x3399/0x4c20 kernel/locking/lockdep.c:3338 lock_acquire+0x1ed/0x520 kernel/locking/lockdep.c:3841 __raw_write_lock_bh include/linux/rwlock_api_smp.h:203 [inline] _raw_write_lock_bh+0x31/0x40 kernel/locking/spinlock.c:312 neigh_change_state+0x1dc/0x7a0 net/core/neighbour.c:141 kobject: 'kvm' (00000000a3800bbf): kobject_uevent_env kobject: 'kvm' (00000000a3800bbf): fill_kobj_path: path = '/devices/virtual/misc/kvm' __neigh_update+0x478/0x1eb0 net/core/neighbour.c:1302 neigh_add+0x613/0xd90 net/core/neighbour.c:1899 rtnetlink_rcv_msg+0x46a/0xc20 net/core/rtnetlink.c:4971 netlink_rcv_skb+0x172/0x440 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:4989 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x5a5/0x760 net/netlink/af_netlink.c:1336 netlink_sendmsg+0xa18/0xfc0 net/netlink/af_netlink.c:1917 kobject: 'loop1' (00000000cc0be2c0): kobject_uevent_env kobject: 'loop1' (00000000cc0be2c0): fill_kobj_path: path = '/devices/virtual/block/loop1' sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:632 ___sys_sendmsg+0x7fd/0x930 net/socket.c:2117 kobject: 'kvm' (00000000a3800bbf): kobject_uevent_env kobject: 'kvm' (00000000a3800bbf): fill_kobj_path: path = '/devices/virtual/misc/kvm' __sys_sendmsg+0x11d/0x280 net/socket.c:2155 kobject: 'kvm' (00000000a3800bbf): kobject_uevent_env __do_sys_sendmsg net/socket.c:2164 [inline] __se_sys_sendmsg net/socket.c:2162 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2162 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 kobject: 'kvm' (00000000a3800bbf): fill_kobj_path: path = '/devices/virtual/misc/kvm' kobject: 'kvm' (00000000a3800bbf): kobject_uevent_env entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457669 Code: fd b3 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 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 kobject: 'kvm' (00000000a3800bbf): fill_kobj_path: path = '/devices/virtual/misc/kvm' RSP: 002b:00007f58e9727c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457669 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f58e97286d4 R13: 00000000004c3e94 R14: 00000000004d6d20 R15: 00000000ffffffff kobject: 'loop0' (00000000bdf78471): kobject_uevent_env kobject: 'kvm' (00000000a3800bbf): kobject_uevent_env kobject: 'kvm' (00000000a3800bbf): fill_kobj_path: path = '/devices/virtual/misc/kvm' kobject: 'loop0' (00000000bdf78471): fill_kobj_path: path = '/devices/virtual/block/loop0' kobject: 'loop3' (00000000e3cb11a9): kobject_uevent_env kobject: 'loop3' (00000000e3cb11a9): fill_kobj_path: path = '/devices/virtual/block/loop3' kobject: 'kvm' (00000000a3800bbf): kobject_uevent_env kobject: 'loop1' (00000000cc0be2c0): kobject_uevent_env kobject: 'loop1' (00000000cc0be2c0): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'kvm' (00000000a3800bbf): fill_kobj_path: path = '/devices/virtual/misc/kvm' kobject: 'loop5' (00000000f4178d66): kobject_uevent_env kobject: 'loop5' (00000000f4178d66): fill_kobj_path: path = '/devices/virtual/block/loop5' kobject: 'loop3' (00000000e3cb11a9): kobject_uevent_env ================================================================== BUG: KASAN: slab-out-of-bounds in memset include/linux/string.h:337 [inline] BUG: KASAN: slab-out-of-bounds in fpstate_init+0x50/0x160 arch/x86/kernel/fpu/core.c:178 Write of size 832 at addr ffff8881b12a2bc0 by task syz-executor0/8273 CPU: 0 PID: 8273 Comm: syz-executor0 Not tainted 4.20.0-rc6-next-20181217+ #172 kobject: 'kvm' (00000000a3800bbf): kobject_uevent_env 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+0x244/0x39d lib/dump_stack.c:113 kobject: 'kvm' (00000000a3800bbf): fill_kobj_path: path = '/devices/virtual/misc/kvm' print_address_description.cold.4+0x9/0x1ff mm/kasan/report.c:187 kasan_report.cold.5+0x1b/0x39 mm/kasan/report.c:317 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/generic.c:191 memset+0x23/0x40 mm/kasan/common.c:113 memset include/linux/string.h:337 [inline] fpstate_init+0x50/0x160 arch/x86/kernel/fpu/core.c:178 fx_init arch/x86/kvm/x86.c:8646 [inline] kvm_arch_vcpu_init+0x3e9/0x870 arch/x86/kvm/x86.c:9006 kvm_vcpu_init+0x2fa/0x420 arch/x86/kvm/../../../virt/kvm/kvm_main.c:315 vmx_create_vcpu+0x1b7/0x2695 arch/x86/kvm/vmx/vmx.c:6375 kvm_arch_vcpu_create+0xe5/0x220 arch/x86/kvm/x86.c:8679 kvm_vm_ioctl_create_vcpu arch/x86/kvm/../../../virt/kvm/kvm_main.c:2555 [inline] kvm_vm_ioctl+0x526/0x2030 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3084 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0x1de/0x1790 fs/ioctl.c:696 ksys_ioctl+0xa9/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+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457669 Code: fd b3 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 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f177b43ac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457669 RDX: 0000000000000000 RSI: 000000000000ae41 RDI: 0000000000000004 RBP: 000000000072c040 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f177b43b6d4 R13: 00000000004c00ff R14: 00000000004d1170 R15: 00000000ffffffff Allocated by task 8273: save_stack+0x43/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] kasan_kmalloc+0xcb/0xd0 mm/kasan/common.c:482 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:397 kmem_cache_alloc+0x130/0x730 mm/slab.c:3541 kmem_cache_zalloc include/linux/slab.h:730 [inline] vmx_create_vcpu+0x110/0x2695 arch/x86/kvm/vmx/vmx.c:6366 kvm_arch_vcpu_create+0xe5/0x220 arch/x86/kvm/x86.c:8679 kvm_vm_ioctl_create_vcpu arch/x86/kvm/../../../virt/kvm/kvm_main.c:2555 [inline] kvm_vm_ioctl+0x526/0x2030 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3084 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0x1de/0x1790 fs/ioctl.c:696 ksys_ioctl+0xa9/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+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8881b12a2b80 which belongs to the cache x86_fpu of size 832 The buggy address is located 64 bytes inside of 832-byte region [ffff8881b12a2b80, ffff8881b12a2ec0) The buggy address belongs to the page: page:ffffea0006c4a880 count:1 mapcount:0 mapping:ffff8881d7930680 index:0x0 flags: 0x2fffc0000000200(slab) raw: 02fffc0000000200 ffff8881d71b3248 ffff8881d71b3248 ffff8881d7930680 raw: 0000000000000000 ffff8881b12a2040 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881b12a2d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881b12a2e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881b12a2e80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff8881b12a2f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881b12a2f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== kobject: 'loop3' (00000000e3cb11a9): fill_kobj_path: path = '/devices/virtual/block/loop3'