syzbot


memory leak in internal_dev_create

Status: fixed on 2019/11/23 02:56
Subsystems: openvswitch
[Documentation on labels]
Reported-by: syzbot+13210896153522fe1ee5@syzkaller.appspotmail.com
Fix commit: 9464cc37f367 net: openvswitch: free vport unless register_netdevice() succeeds
First crash: 1788d, last: 1697d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 4.19 000/125] 4.19.84-stable review 144 (144) 2019/11/18 14:33
[PATCH 4.14 000/105] 4.14.154-stable review 115 (115) 2019/11/13 09:55
[PATCH 5.3 000/193] 5.3.11-stable review 200 (200) 2019/11/12 18:26
[PATCH net] net: openvswitch: free vport unless register_netdevice() succeeds 4 (4) 2019/10/23 00:20
Re: [PATCH net] net: openvswitch: free vport unless register_netdevice() succeeds 1 (1) 2019/10/21 11:41
Re: [PATCH] net: openvswitch: free vport unless register_netdevice() succeeds 2 (2) 2019/09/13 11:04
Re: memory leak in internal_dev_create 2 (2) 2019/08/09 00:45
memory leak in internal_dev_create 0 (1) 2019/08/06 08:58

Sample crash report:
BUG: memory leak
unreferenced object 0xffff888120f2cb00 (size 128):
  comm "syz-executor282", pid 6987, jiffies 4294942439 (age 8.010s)
  hex dump (first 32 bytes):
    00 70 d0 1c 81 88 ff ff 80 ca f2 20 81 88 ff ff  .p......... ....
    80 00 8e 13 81 88 ff ff 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<000000001b64cc43>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]
    [<000000001b64cc43>] slab_post_alloc_hook mm/slab.h:586 [inline]
    [<000000001b64cc43>] slab_alloc mm/slab.c:3319 [inline]
    [<000000001b64cc43>] kmem_cache_alloc_trace+0x145/0x2c0 mm/slab.c:3548
    [<0000000016fbc9fb>] kmalloc include/linux/slab.h:556 [inline]
    [<0000000016fbc9fb>] kzalloc include/linux/slab.h:690 [inline]
    [<0000000016fbc9fb>] ovs_vport_alloc+0x37/0xf0 net/openvswitch/vport.c:130
    [<00000000eb46d21c>] internal_dev_create+0x24/0x1d0 net/openvswitch/vport-internal_dev.c:164
    [<00000000b406424b>] ovs_vport_add+0x81/0x190 net/openvswitch/vport.c:199
    [<000000000ac85c81>] new_vport+0x19/0x80 net/openvswitch/datapath.c:194
    [<00000000a3a2d403>] ovs_dp_cmd_new+0x290/0x410 net/openvswitch/datapath.c:1644
    [<000000003cbdd4eb>] genl_family_rcv_msg+0x2ab/0x5b0 net/netlink/genetlink.c:629
    [<00000000cf076bf6>] genl_rcv_msg+0x54/0xa0 net/netlink/genetlink.c:654
    [<00000000b51fdf7d>] netlink_rcv_skb+0x61/0x170 net/netlink/af_netlink.c:2477
    [<0000000029a5cf3d>] genl_rcv+0x29/0x40 net/netlink/genetlink.c:665
    [<000000003bea255f>] netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
    [<000000003bea255f>] netlink_unicast+0x1ec/0x2d0 net/netlink/af_netlink.c:1328
    [<00000000ad7bd760>] netlink_sendmsg+0x270/0x480 net/netlink/af_netlink.c:1917
    [<0000000059bd64c3>] sock_sendmsg_nosec net/socket.c:637 [inline]
    [<0000000059bd64c3>] sock_sendmsg+0x54/0x70 net/socket.c:657
    [<0000000041d1979c>] ___sys_sendmsg+0x393/0x3c0 net/socket.c:2311
    [<000000007dfd17b4>] __sys_sendmsg+0x80/0xf0 net/socket.c:2356
    [<000000007bec23fc>] __do_sys_sendmsg net/socket.c:2365 [inline]
    [<000000007bec23fc>] __se_sys_sendmsg net/socket.c:2363 [inline]
    [<000000007bec23fc>] __x64_sys_sendmsg+0x23/0x30 net/socket.c:2363

BUG: memory leak
unreferenced object 0xffff8881138e0080 (size 64):
  comm "syz-executor282", pid 6987, jiffies 4294942439 (age 8.010s)
  hex dump (first 32 bytes):
    01 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00  ................
    48 01 8e 13 81 88 ff ff 02 00 00 00 05 35 82 c1  H............5..
  backtrace:
    [<00000000bd030ecd>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]
    [<00000000bd030ecd>] slab_post_alloc_hook mm/slab.h:586 [inline]
    [<00000000bd030ecd>] slab_alloc mm/slab.c:3319 [inline]
    [<00000000bd030ecd>] __do_kmalloc mm/slab.c:3653 [inline]
    [<00000000bd030ecd>] __kmalloc+0x169/0x300 mm/slab.c:3664
    [<0000000063298f36>] kmalloc include/linux/slab.h:561 [inline]
    [<0000000063298f36>] ovs_vport_set_upcall_portids+0x54/0xd0 net/openvswitch/vport.c:343
    [<0000000011a526e0>] ovs_vport_alloc+0x7f/0xf0 net/openvswitch/vport.c:139
    [<00000000eb46d21c>] internal_dev_create+0x24/0x1d0 net/openvswitch/vport-internal_dev.c:164
    [<00000000b406424b>] ovs_vport_add+0x81/0x190 net/openvswitch/vport.c:199
    [<000000000ac85c81>] new_vport+0x19/0x80 net/openvswitch/datapath.c:194
    [<00000000a3a2d403>] ovs_dp_cmd_new+0x290/0x410 net/openvswitch/datapath.c:1644
    [<000000003cbdd4eb>] genl_family_rcv_msg+0x2ab/0x5b0 net/netlink/genetlink.c:629
    [<00000000cf076bf6>] genl_rcv_msg+0x54/0xa0 net/netlink/genetlink.c:654
    [<00000000b51fdf7d>] netlink_rcv_skb+0x61/0x170 net/netlink/af_netlink.c:2477
    [<0000000029a5cf3d>] genl_rcv+0x29/0x40 net/netlink/genetlink.c:665
    [<000000003bea255f>] netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
    [<000000003bea255f>] netlink_unicast+0x1ec/0x2d0 net/netlink/af_netlink.c:1328
    [<00000000ad7bd760>] netlink_sendmsg+0x270/0x480 net/netlink/af_netlink.c:1917
    [<0000000059bd64c3>] sock_sendmsg_nosec net/socket.c:637 [inline]
    [<0000000059bd64c3>] sock_sendmsg+0x54/0x70 net/socket.c:657
    [<0000000041d1979c>] ___sys_sendmsg+0x393/0x3c0 net/socket.c:2311
    [<000000007dfd17b4>] __sys_sendmsg+0x80/0xf0 net/socket.c:2356


Crashes (88):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/01 02:20 upstream e472c64aa4fa a41ca8fa .config console log report syz C ci-upstream-gce-leak
2019/10/29 14:42 upstream 8005803a2ca0 5ea87a66 .config console log report syz C ci-upstream-gce-leak
2019/10/29 08:15 upstream 8005803a2ca0 5ea87a66 .config console log report syz C ci-upstream-gce-leak
2019/10/28 15:09 upstream 9e5eefba3d09 25bb509e .config console log report syz C ci-upstream-gce-leak
2019/10/27 02:57 upstream f877bee5ea0b 25bb509e .config console log report syz C ci-upstream-gce-leak
2019/10/24 22:51 upstream f116b96685a0 d01bb02a .config console log report syz C ci-upstream-gce-leak
2019/10/23 20:10 upstream 13b86bc4cd64 b602d64b .config console log report syz C ci-upstream-gce-leak
2019/10/22 18:40 upstream 3b7c59a1950c 5681358a .config console log report syz C ci-upstream-gce-leak
2019/10/21 19:53 upstream 7d194c2100ad b24d2b8a .config console log report syz C ci-upstream-gce-leak
2019/10/21 19:22 upstream 7d194c2100ad b24d2b8a .config console log report syz C ci-upstream-gce-leak
2019/10/21 18:57 upstream 7d194c2100ad b24d2b8a .config console log report syz C ci-upstream-gce-leak
2019/10/21 18:30 upstream 7d194c2100ad b24d2b8a .config console log report syz C ci-upstream-gce-leak
2019/10/21 11:50 upstream 7d194c2100ad 8c88c9c1 .config console log report syz C ci-upstream-gce-leak
2019/10/19 04:56 upstream b9959c7a347d 8c88c9c1 .config console log report syz C ci-upstream-gce-leak
2019/10/18 09:01 upstream 283ea345934d 8c88c9c1 .config console log report syz C ci-upstream-gce-leak
2019/10/17 12:22 upstream bc88f85c6c09 8c88c9c1 .config console log report syz C ci-upstream-gce-leak
2019/10/14 23:08 upstream 4f5cafb5cb84 05ad7292 .config console log report syz C ci-upstream-gce-leak
2019/10/14 06:05 upstream d4615e5a4680 2f661ec4 .config console log report syz C ci-upstream-gce-leak
2019/10/14 02:02 upstream da94001239cc 2f661ec4 .config console log report syz C ci-upstream-gce-leak
2019/10/13 07:46 upstream 328fefadd9cf 426631dd .config console log report syz C ci-upstream-gce-leak
2019/10/11 11:40 upstream 9e208aa06c21 1a3bad90 .config console log report syz C ci-upstream-gce-leak
2019/10/10 12:51 upstream 8a8c600de5dc a4efa8c0 .config console log report syz C ci-upstream-gce-leak
2019/10/08 19:56 upstream eda57a0e4299 b1ebbfef .config console log report syz C ci-upstream-gce-leak
2019/10/07 03:06 upstream 7cdb85df6061 f3f7d9c8 .config console log report syz C ci-upstream-gce-leak
2019/10/06 04:10 upstream 4ea655343ce4 f3f7d9c8 .config console log report syz C ci-upstream-gce-leak
2019/10/06 03:39 upstream 4ea655343ce4 f3f7d9c8 .config console log report syz C ci-upstream-gce-leak
2019/10/04 10:17 upstream cc3a7bfe62b9 fc17ba49 .config console log report syz C ci-upstream-gce-leak
2019/10/02 16:00 upstream 54ecb8f7028c 2e29b534 .config console log report syz C ci-upstream-gce-leak
2019/10/02 02:49 upstream 54ecb8f7028c b7a87a83 .config console log report syz C ci-upstream-gce-leak
2019/10/01 15:44 upstream 54ecb8f7028c b7a87a83 .config console log report syz C ci-upstream-gce-leak
2019/09/30 03:01 upstream a3c0e7b1fe1f c1ad5441 .config console log report syz C ci-upstream-gce-leak
2019/09/29 23:19 upstream a3c0e7b1fe1f c1ad5441 .config console log report syz C ci-upstream-gce-leak
2019/09/28 08:47 upstream 8f744bdee4fe d8074e0b .config console log report syz C ci-upstream-gce-leak
2019/09/28 00:32 upstream da05b5ea12c1 d8074e0b .config console log report syz C ci-upstream-gce-leak
2019/09/26 17:15 upstream f41def397161 24d405a3 .config console log report syz C ci-upstream-gce-leak
2019/09/24 23:40 upstream 4c07e2ddab5b 0942eab8 .config console log report syz C ci-upstream-gce-leak
2019/09/22 20:31 upstream f7c3bf8fa7e5 d96e88f3 .config console log report syz C ci-upstream-gce-leak
2019/09/21 10:38 upstream f97c81dc6ca5 d96e88f3 .config console log report syz C ci-upstream-gce-leak
2019/09/20 08:33 upstream 3c2edc36a774 4d3ae0b7 .config console log report syz C ci-upstream-gce-leak
2019/09/19 17:38 upstream b41dae061bbd eb940044 .config console log report syz C ci-upstream-gce-leak
2019/09/19 11:41 upstream b41dae061bbd eb940044 .config console log report syz C ci-upstream-gce-leak
2019/09/18 05:59 upstream 7f2444d38f6b 03e0d245 .config console log report syz C ci-upstream-gce-leak
2019/09/17 09:26 upstream cef7298262e9 51ca0454 .config console log report syz C ci-upstream-gce-leak
2019/09/16 22:53 upstream 4d856f72c10e cb936299 .config console log report syz C ci-upstream-gce-leak
2019/09/15 11:48 upstream 1609d7604b84 32d59357 .config console log report syz C ci-upstream-gce-leak
2019/09/15 09:13 upstream 1609d7604b84 32d59357 .config console log report syz C ci-upstream-gce-leak
2019/09/14 04:23 upstream a7f89616b737 32d59357 .config console log report syz C ci-upstream-gce-leak
2019/09/13 10:47 upstream 505a8ec7e11a 40fa42bc .config console log report syz C ci-upstream-gce-leak
2019/08/17 03:33 upstream 2d63ba3e41db 8fd428a1 .config console log report syz C ci-upstream-gce-leak
2019/08/15 17:52 upstream 41de59634046 0d298d6b .config console log report syz C ci-upstream-gce-leak
2019/08/14 21:16 upstream a8dba0531bc0 5576551b .config console log report syz C ci-upstream-gce-leak
2019/08/14 13:36 upstream ee1c7bd33e66 5576551b .config console log report syz C ci-upstream-gce-leak
2019/08/14 13:14 upstream ee1c7bd33e66 5576551b .config console log report syz C ci-upstream-gce-leak
2019/08/13 07:43 upstream d45331b00ddb 8620c2c2 .config console log report syz C ci-upstream-gce-leak
2019/08/12 12:02 upstream d45331b00ddb acb51638 .config console log report syz C ci-upstream-gce-leak
2019/08/11 11:04 upstream 296d05cb0d3c acb51638 .config console log report syz C ci-upstream-gce-leak
2019/08/11 10:19 upstream 296d05cb0d3c acb51638 .config console log report syz C ci-upstream-gce-leak
2019/08/10 19:41 upstream 451577f3e3a9 acb51638 .config console log report syz C ci-upstream-gce-leak
2019/08/10 19:01 upstream 451577f3e3a9 acb51638 .config console log report syz C ci-upstream-gce-leak
2019/08/07 20:26 upstream 33920f1ec5bf e6ebef88 .config console log report syz C ci-upstream-gce-leak
2019/08/06 22:13 upstream 0eb0ce0a78e1 c6f01e54 .config console log report syz C ci-upstream-gce-leak
2019/08/06 10:34 upstream 0eb0ce0a78e1 6affd8e8 .config console log report syz C ci-upstream-gce-leak
2019/08/06 10:07 upstream 0eb0ce0a78e1 6affd8e8 .config console log report syz C ci-upstream-gce-leak
2019/08/05 11:30 upstream e21a712a9685 6affd8e8 .config console log report syz C ci-upstream-gce-leak
2019/08/05 03:15 upstream 4b6f23161b4e 6affd8e8 .config console log report syz C ci-upstream-gce-leak
2019/08/03 13:36 upstream 97b00aff2c45 6affd8e8 .config console log report syz C ci-upstream-gce-leak
2019/08/03 13:09 upstream 97b00aff2c45 6affd8e8 .config console log report syz C ci-upstream-gce-leak
2019/08/02 06:11 upstream 1e78030e5e5b 835dffe7 .config console log report syz C ci-upstream-gce-leak
* Struck through repros no longer work on HEAD.