syzbot


kernel BUG at net/core/net-sysfs.c:LINE!

Status: fixed on 2019/05/27 12:48
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+6024817a931b2830bc93@syzkaller.appspotmail.com
Fix commit: 8ed633b9baf9 Revert "net-sysfs: Fix memory leak in netdev_register_kobject"
First crash: 1909d, last: 1872d
Cause bisection: introduced by (bisect log) :
commit 6b70fc94afd165342876e53fc4b2f7d085009945
Author: Wang Hai <wanghai26@huawei.com>
Date: Wed Mar 20 18:25:05 2019 +0000

  net-sysfs: Fix memory leak in netdev_register_kobject

Crash: kernel BUG at net/core/net-sysfs.c:LINE! (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH 0/2] net-sysfs: revert wrong bugfix and re-fix 12 (12) 2019/04/15 20:10
kernel BUG at net/core/net-sysfs.c:LINE! 8 (9) 2019/04/05 02:55

Sample crash report:
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000441399
RDX: 0000000020000080 RSI: 00000000000089f1 RDI: 0000000000000006
RBP: 00007ffcd20666d0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000007 R14: 0000000000000000 R15: 0000000000000000
------------[ cut here ]------------
kernel BUG at net/core/net-sysfs.c:1631!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8035 Comm: syz-executor344 Not tainted 5.1.0-rc1-next-20190322 #9
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:netdev_release net/core/net-sysfs.c:1631 [inline]
RIP: 0010:netdev_release+0x92/0xb0 net/core/net-sysfs.c:1627
Code: 48 c1 ea 03 80 3c 02 00 75 29 48 8b bb 80 fa ff ff e8 12 77 20 fc 4c 89 ef e8 7a cc f5 ff 5b 41 5c 41 5d 5d c3 e8 9e 9b e8 fb <0f> 0b e8 27 b1 20 fc eb 9c e8 80 b1 20 fc eb d0 0f 1f 40 00 66 2e
RSP: 0018:ffff88808d6af718 EFLAGS: 00010293
RAX: ffff8880a87902c0 RBX: ffff88808e3612a0 RCX: ffffffff8587fc89
RDX: 0000000000000000 RSI: ffffffff8587fcd2 RDI: 0000000000000001
RBP: ffff88808d6af730 R08: ffff8880a87902c0 R09: ffff8880a8790b60
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88808e360d00 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000001752880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000098da2000 CR4: 00000000001406e0
Call Trace:
 device_release+0x7d/0x210 drivers/base/core.c:1064
 kobject_cleanup lib/kobject.c:662 [inline]
 kobject_release lib/kobject.c:691 [inline]
 kref_put include/linux/kref.h:67 [inline]
 kobject_put.cold+0x28f/0x2ec lib/kobject.c:708
 put_device+0x20/0x30 drivers/base/core.c:2205
 netdev_register_kobject+0x1a1/0x3c0 net/core/net-sysfs.c:1763
 register_netdevice+0x878/0xff0 net/core/dev.c:8709
 ip6_tnl_create2+0x1c2/0x350 net/ipv6/ip6_tunnel.c:269
 ip6_tnl_create net/ipv6/ip6_tunnel.c:320 [inline]
 ip6_tnl_locate+0x63f/0x8d0 net/ipv6/ip6_tunnel.c:368
 ip6_tnl_ioctl+0x490/0xab0 net/ipv6/ip6_tunnel.c:1634
 dev_ifsioc+0x257/0x990 net/core/dev_ioctl.c:322
 dev_ioctl+0x286/0xc90 net/core/dev_ioctl.c:513
 sock_ioctl+0x48b/0x610 net/socket.c:1102
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:509 [inline]
 do_vfs_ioctl+0xd6e/0x1390 fs/ioctl.c:696
 ksys_ioctl+0xab/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+0x103/0x610 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441399
Code: e8 5c ae 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 bb 0a fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffcd20666b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000441399
RDX: 0000000020000080 RSI: 00000000000089f1 RDI: 0000000000000006
RBP: 00007ffcd20666d0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000007 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 0dbf190846958075 ]---
RIP: 0010:netdev_release net/core/net-sysfs.c:1631 [inline]
RIP: 0010:netdev_release+0x92/0xb0 net/core/net-sysfs.c:1627
Code: 48 c1 ea 03 80 3c 02 00 75 29 48 8b bb 80 fa ff ff e8 12 77 20 fc 4c 89 ef e8 7a cc f5 ff 5b 41 5c 41 5d 5d c3 e8 9e 9b e8 fb <0f> 0b e8 27 b1 20 fc eb 9c e8 80 b1 20 fc eb d0 0f 1f 40 00 66 2e
RSP: 0018:ffff88808d6af718 EFLAGS: 00010293
RAX: ffff8880a87902c0 RBX: ffff88808e3612a0 RCX: ffffffff8587fc89
RDX: 0000000000000000 RSI: ffffffff8587fcd2 RDI: 0000000000000001
RBP: ffff88808d6af730 R08: ffff8880a87902c0 R09: ffff8880a8790b60
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88808e360d00 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000001752880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000098da2000 CR4: 00000000001406e0

Crashes (890):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/03/22 22:52 linux-next e382d91f5f80 3361bde5 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/04/17 17:12 upstream 444fe9913539 b0e8efcb .config console log report ci-upstream-kasan-gce
2019/04/17 15:54 upstream 444fe9913539 b0e8efcb .config console log report ci-upstream-kasan-gce
2019/04/17 14:51 upstream 444fe9913539 b0e8efcb .config console log report ci-upstream-kasan-gce-selinux-root
2019/04/17 13:05 upstream 444fe9913539 b0e8efcb .config console log report ci-upstream-kasan-gce-selinux-root
2019/04/17 11:41 upstream 444fe9913539 b0e8efcb .config console log report ci-upstream-kasan-gce-root
2019/04/17 11:14 upstream 444fe9913539 b0e8efcb .config console log report ci-upstream-kasan-gce
2019/04/17 09:39 upstream 444fe9913539 b0e8efcb .config console log report ci-upstream-kasan-gce-root
2019/04/17 04:43 upstream 444fe9913539 b0e8efcb .config console log report ci-upstream-kasan-gce-selinux-root
2019/04/17 03:38 upstream 444fe9913539 b0e8efcb .config console log report ci-upstream-kasan-gce-selinux-root
2019/04/16 23:30 upstream 618d919cae2f 505ab413 .config console log report ci-upstream-kasan-gce
2019/04/16 21:54 upstream 618d919cae2f 505ab413 .config console log report ci-upstream-kasan-gce
2019/04/16 20:16 upstream b5de3c5026f5 505ab413 .config console log report ci-upstream-kasan-gce-root
2019/04/16 16:32 upstream 618d919cae2f 505ab413 .config console log report ci-upstream-kasan-gce-root
2019/04/16 12:41 upstream 618d919cae2f 505ab413 .config console log report ci-upstream-kasan-gce-root
2019/04/16 09:16 upstream 5512320c9f6f 505ab413 .config console log report ci-upstream-kasan-gce-smack-root
2019/04/16 08:53 upstream 5512320c9f6f 505ab413 .config console log report ci-upstream-kasan-gce-smack-root
2019/04/16 07:35 upstream 5512320c9f6f 505ab413 .config console log report ci-upstream-kasan-gce-selinux-root
2019/04/16 01:32 upstream 5512320c9f6f 505ab413 .config console log report ci-upstream-kasan-gce-selinux-root
2019/04/15 18:51 upstream dc4060a5dc25 505ab413 .config console log report ci-upstream-kasan-gce-selinux-root
2019/04/15 17:46 upstream dc4060a5dc25 505ab413 .config console log report ci-upstream-kasan-gce-root
2019/04/16 04:29 upstream 5512320c9f6f 505ab413 .config console log report ci-upstream-kasan-gce-386
2019/04/15 22:23 upstream dc4060a5dc25 505ab413 .config console log report ci-upstream-kasan-gce-386
2019/04/15 14:17 upstream dc4060a5dc25 505ab413 .config console log report ci-upstream-kasan-gce-386
2019/04/28 07:15 bpf 0edd6b64d193 b617407b .config console log report ci-upstream-bpf-kasan-gce
2019/04/27 12:06 bpf 0edd6b64d193 b617407b .config console log report ci-upstream-bpf-kasan-gce
2019/04/26 17:06 bpf 0edd6b64d193 b617407b .config console log report ci-upstream-bpf-kasan-gce
2019/04/26 08:07 bpf 7f09baa92884 b617407b .config console log report ci-upstream-bpf-kasan-gce
2019/04/25 20:43 bpf fed68833fc53 f46aabc8 .config console log report ci-upstream-bpf-kasan-gce
2019/04/25 18:00 bpf fed68833fc53 f46aabc8 .config console log report ci-upstream-bpf-kasan-gce
2019/04/25 16:02 bpf fed68833fc53 f46aabc8 .config console log report ci-upstream-bpf-kasan-gce
2019/04/24 12:54 bpf fed68833fc53 8e3c52b1 .config console log report ci-upstream-bpf-kasan-gce
2019/04/24 09:55 bpf fed68833fc53 8e3c52b1 .config console log report ci-upstream-bpf-kasan-gce
2019/04/24 03:28 bpf fed68833fc53 4d3d6a50 .config console log report ci-upstream-bpf-kasan-gce
2019/04/23 23:33 bpf fed68833fc53 4d3d6a50 .config console log report ci-upstream-bpf-kasan-gce
2019/04/23 21:23 bpf fed68833fc53 4d3d6a50 .config console log report ci-upstream-bpf-kasan-gce
2019/04/22 21:14 bpf fed68833fc53 53199d6e .config console log report ci-upstream-bpf-kasan-gce
2019/04/22 11:42 bpf fed68833fc53 0a77c33c .config console log report ci-upstream-bpf-kasan-gce
2019/04/22 03:28 bpf fed68833fc53 b0e8efcb .config console log report ci-upstream-bpf-kasan-gce
2019/04/18 12:38 bpf fed68833fc53 b0e8efcb .config console log report ci-upstream-bpf-kasan-gce
2019/04/17 08:01 bpf fed68833fc53 b0e8efcb .config console log report ci-upstream-bpf-kasan-gce
2019/04/15 21:11 net-old 732488018281 505ab413 .config console log report ci-upstream-net-this-kasan-gce
2019/04/22 23:50 bpf-next 3b8802446d27 53199d6e .config console log report ci-upstream-bpf-next-kasan-gce
2019/04/22 22:23 bpf-next 4519efa6f8ea 53199d6e .config console log report ci-upstream-bpf-next-kasan-gce
2019/04/22 13:55 bpf-next 4519efa6f8ea 0a77c33c .config console log report ci-upstream-bpf-next-kasan-gce
2019/04/22 08:55 bpf-next 4519efa6f8ea 0a77c33c .config console log report ci-upstream-bpf-next-kasan-gce
2019/04/20 02:18 bpf-next 4519efa6f8ea b0e8efcb .config console log report ci-upstream-bpf-next-kasan-gce
2019/04/20 01:24 bpf-next 4519efa6f8ea b0e8efcb .config console log report ci-upstream-bpf-next-kasan-gce
2019/04/19 09:24 bpf-next 80695946737d b0e8efcb .config console log report ci-upstream-bpf-next-kasan-gce
2019/04/18 20:12 bpf-next ba02de1aa04e b0e8efcb .config console log report ci-upstream-bpf-next-kasan-gce
2019/04/18 18:12 bpf-next ba02de1aa04e b0e8efcb .config console log report ci-upstream-bpf-next-kasan-gce
2019/04/17 21:58 net-next-old 3a6f7892acc1 b0e8efcb .config console log report ci-upstream-net-kasan-gce
2019/04/17 01:55 bpf-next 02a8c817a316 b0e8efcb .config console log report ci-upstream-bpf-next-kasan-gce
2019/04/16 21:54 bpf-next 02a8c817a316 505ab413 .config console log report ci-upstream-bpf-next-kasan-gce
2019/04/16 10:18 bpf-next bcbccad694b7 505ab413 .config console log report ci-upstream-bpf-next-kasan-gce
2019/04/15 16:09 net-next-old e62b2fd5d3b4 505ab413 .config console log report ci-upstream-net-kasan-gce
2019/04/15 13:02 net-next-old e62b2fd5d3b4 505ab413 .config console log report ci-upstream-net-kasan-gce
2019/04/16 02:39 linux-next f9221a7a1014 505ab413 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/04/16 00:08 linux-next f9221a7a1014 505ab413 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/04/15 15:29 linux-next f9221a7a1014 505ab413 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.