R10: 0000000000000000 R11: 0000000000000246 R12: 00007f2e710336d4 R13: 00000000004c7af5 R14: 00000000004dd840 R15: 0000000000000004 ================================================================== BUG: KASAN: use-after-free in internal_dev_create+0x4da/0x4e0 net/openvswitch/vport-internal_dev.c:214 Read of size 8 at addr ffff888092a2c600 by task syz-executor.1/7377 CPU: 0 PID: 7377 Comm: syz-executor.1 Not tainted 5.2.0-rc2+ #0 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+0x113/0x167 lib/dump_stack.c:113 print_address_description.cold.5+0x9/0x1ff mm/kasan/report.c:188 __kasan_report.cold.6+0x1b/0x39 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 internal_dev_create+0x4da/0x4e0 net/openvswitch/vport-internal_dev.c:214 ovs_vport_add+0x25c/0x500 net/openvswitch/vport.c:212 new_vport+0x15/0x1f0 net/openvswitch/datapath.c:207 ovs_dp_cmd_new+0x48a/0xce0 net/openvswitch/datapath.c:1627 genl_family_rcv_msg+0x5cc/0x1150 net/netlink/genetlink.c:629 genl_rcv_msg+0xa7/0x13e net/netlink/genetlink.c:654 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2486 genl_rcv+0x23/0x40 net/netlink/genetlink.c:665 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x43f/0x630 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x765/0xc50 net/netlink/af_netlink.c:1926 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:671 ___sys_sendmsg+0x647/0x950 net/socket.c:2292 __sys_sendmsg+0xd9/0x180 net/socket.c:2330 __do_sys_sendmsg net/socket.c:2339 [inline] __se_sys_sendmsg net/socket.c:2337 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2337 do_syscall_64+0xd0/0x530 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459a29 Code: fd b7 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 b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f2e71032c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f2e71032c90 RCX: 0000000000459a29 RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f2e710336d4 R13: 00000000004c7af5 R14: 00000000004dd840 R15: 0000000000000004 Allocated by task 7377: save_stack+0x21/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc.constprop.8+0xc7/0xd0 mm/kasan/common.c:489 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:503 kmem_cache_alloc_trace+0x154/0x740 mm/slab.c:3555 kmalloc include/linux/slab.h:547 [inline] kzalloc include/linux/slab.h:742 [inline] ovs_vport_alloc+0x51/0x250 net/openvswitch/vport.c:143 internal_dev_create+0x23/0x4e0 net/openvswitch/vport-internal_dev.c:175 ovs_vport_add+0x25c/0x500 net/openvswitch/vport.c:212 new_vport+0x15/0x1f0 net/openvswitch/datapath.c:207 ovs_dp_cmd_new+0x48a/0xce0 net/openvswitch/datapath.c:1627 genl_family_rcv_msg+0x5cc/0x1150 net/netlink/genetlink.c:629 genl_rcv_msg+0xa7/0x13e net/netlink/genetlink.c:654 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2486 genl_rcv+0x23/0x40 net/netlink/genetlink.c:665 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x43f/0x630 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x765/0xc50 net/netlink/af_netlink.c:1926 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:671 ___sys_sendmsg+0x647/0x950 net/socket.c:2292 __sys_sendmsg+0xd9/0x180 net/socket.c:2330 __do_sys_sendmsg net/socket.c:2339 [inline] __se_sys_sendmsg net/socket.c:2337 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2337 do_syscall_64+0xd0/0x530 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7377: save_stack+0x21/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3432 [inline] kfree+0xcf/0x220 mm/slab.c:3755 ovs_vport_free+0x34/0x40 net/openvswitch/vport.c:177 internal_dev_destructor+0x5f/0x70 net/openvswitch/vport-internal_dev.c:96 register_netdevice+0xa84/0x1100 net/core/dev.c:8793 internal_dev_create+0x2b6/0x4e0 net/openvswitch/vport-internal_dev.c:202 ovs_vport_add+0x25c/0x500 net/openvswitch/vport.c:212 new_vport+0x15/0x1f0 net/openvswitch/datapath.c:207 ovs_dp_cmd_new+0x48a/0xce0 net/openvswitch/datapath.c:1627 genl_family_rcv_msg+0x5cc/0x1150 net/netlink/genetlink.c:629 genl_rcv_msg+0xa7/0x13e net/netlink/genetlink.c:654 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2486 genl_rcv+0x23/0x40 net/netlink/genetlink.c:665 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x43f/0x630 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x765/0xc50 net/netlink/af_netlink.c:1926 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:671 ___sys_sendmsg+0x647/0x950 net/socket.c:2292 __sys_sendmsg+0xd9/0x180 net/socket.c:2330 __do_sys_sendmsg net/socket.c:2339 [inline] __se_sys_sendmsg net/socket.c:2337 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2337 do_syscall_64+0xd0/0x530 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888092a2c600 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 0 bytes inside of 128-byte region [ffff888092a2c600, ffff888092a2c680) The buggy address belongs to the page: page:ffffea00024a8b00 refcount:1 mapcount:0 mapping:ffff8880aa400640 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000242a308 ffffea000249fbc8 ffff8880aa400640 raw: 0000000000000000 ffff888092a2c000 0000000100000015 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888092a2c500: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff888092a2c580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888092a2c600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888092a2c680: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff888092a2c700: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================