syzbot


WARNING: proc registration bug in snmp6_register_dev

Status: fixed on 2020/07/17 17:58
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+1d51c8b74efa4c44adeb@syzkaller.appspotmail.com
Fix commit: de0083c7ed7d hsr: avoid to create proc file after unregister
First crash: 1502d, last: 1432d
Cause bisection: introduced by (bisect log) :
commit e0a4b99773d3d8d3fb40087805f8fd858a23e582
Author: Taehee Yoo <ap420073@gmail.com>
Date: Fri Feb 28 18:02:10 2020 +0000

  hsr: use upper/lower device infrastructure

Crash: WARNING: proc registration bug in snmp6_register_dev (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH 5.7 000/112] 5.7.8-rc1 review 121 (121) 2020/07/09 09:29
[PATCH net] hsr: avoid to create proc file after unregister 2 (2) 2020/06/23 03:43
WARNING: proc registration bug in snmp6_register_dev 1 (4) 2020/05/06 09:42

Sample crash report:
------------[ cut here ]------------
proc_dir_entry 'dev_snmp6/hsr1' already registered
WARNING: CPU: 0 PID: 7381 at fs/proc/generic.c:362 proc_register+0x40b/0x580 fs/proc/generic.c:362
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 7381 Comm: syz-executor526 Not tainted 5.7.0-rc5-syzkaller #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+0x188/0x20d lib/dump_stack.c:118
 panic+0x2e3/0x75c kernel/panic.c:221
 __warn.cold+0x2f/0x35 kernel/panic.c:582
 report_bug+0x27b/0x2f0 lib/bug.c:195
 fixup_bug arch/x86/kernel/traps.c:175 [inline]
 fixup_bug arch/x86/kernel/traps.c:170 [inline]
 do_error_trap+0x12b/0x220 arch/x86/kernel/traps.c:267
 do_invalid_op+0x32/0x40 arch/x86/kernel/traps.c:286
 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027
RIP: 0010:proc_register+0x40b/0x580 fs/proc/generic.c:362
Code: ff df 48 89 f9 48 c1 e9 03 80 3c 01 00 0f 85 5c 01 00 00 48 8b 04 24 48 c7 c7 e0 69 39 88 48 8b b0 d8 00 00 00 e8 dd cc 61 ff <0f> 0b 48 c7 c7 40 9f ac 89 e8 27 ea ed 05 48 8b 4c 24 28 48 b8 00
RSP: 0018:ffffc90001f9ecc8 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff88809f861408 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815ce751 RDI: fffff520003f3d8b
RBP: ffff888094e6d180 R08: ffff88809d8081c0 R09: ffffed1015cc66a9
R10: ffff8880ae633547 R11: ffffed1015cc66a8 R12: 0000000000000000
R13: dffffc0000000000 R14: ffff888086f578c0 R15: 0000000000000004
 proc_create_single_data+0xdb/0x130 fs/proc/generic.c:631
 snmp6_register_dev+0xbe/0x140 net/ipv6/proc.c:254
 ipv6_add_dev net/ipv6/addrconf.c:408 [inline]
 ipv6_add_dev+0x54b/0x10b0 net/ipv6/addrconf.c:365
 addrconf_notify+0x960/0x2310 net/ipv6/addrconf.c:3503
 notifier_call_chain+0xc0/0x230 kernel/notifier.c:83
 call_netdevice_notifiers_info net/core/dev.c:1948 [inline]
 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1933
 call_netdevice_notifiers_extack net/core/dev.c:1960 [inline]
 call_netdevice_notifiers net/core/dev.c:1974 [inline]
 register_netdevice+0xd70/0x10b0 net/core/dev.c:9425
 hsr_dev_finalize+0x516/0x746 net/hsr/hsr_device.c:486
 hsr_newlink+0x27c/0x520 net/hsr/hsr_netlink.c:83
 __rtnl_newlink+0xf18/0x1590 net/core/rtnetlink.c:3333
 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3391
 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5454
 netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2469
 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
 netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329
 netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:672
 ____sys_sendmsg+0x6bf/0x7e0 net/socket.c:2362
 ___sys_sendmsg+0x100/0x170 net/socket.c:2416
 __sys_sendmsg+0xec/0x1b0 net/socket.c:2449
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x449409
Code: e8 cc 14 03 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 9b 0c fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f8c3b094db8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000006dfca8 RCX: 0000000000449409
RDX: 0000000000000000 RSI: 0000000020000040 RDI: 000000000000000e
RBP: 00000000006dfca0 R08: 0000000000000014 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000246 R12: 00000000006dfcac
R13: 00007fff342f381f R14: 00007f8c3b0959c0 R15: 00000000006dfcac
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (14):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/17 10:42 upstream 3d1c1e5931ce 37bccd4e .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/05/16 19:18 upstream 12bf0b632ed0 37bccd4e .config console log report syz C ci-upstream-kasan-gce-root
2020/05/16 15:18 upstream 12bf0b632ed0 37bccd4e .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/05/06 03:10 linux-next ac935d227366 35b8eb30 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/05/06 08:31 upstream dc56c5acd850 35b8eb30 .config console log report syz ci-upstream-kasan-gce
2020/05/06 09:34 upstream dc56c5acd850 35b8eb30 .config console log report syz ci-upstream-kasan-gce-386
2020/06/20 04:48 upstream 7ae77150d94d 81abc331 .config console log report ci-upstream-kasan-gce-selinux-root
2020/05/29 07:37 upstream 75caf310d16c d19ed305 .config console log report ci-upstream-kasan-gce-root
2020/05/28 20:38 upstream b0c3ba31be3e 0d951763 .config console log report ci-upstream-kasan-gce
2020/04/29 01:56 upstream 3f777e19d171 e3ecea2e .config console log report ci-upstream-kasan-gce
2020/04/11 08:42 upstream ab6f762f0f53 a8c6a3f8 .config console log report ci-upstream-kasan-gce-smack-root
2020/05/07 07:19 net-next-old 2f8649900b7d 4618eb2d .config console log report ci-upstream-net-kasan-gce
2020/05/22 04:34 linux-next ac935d227366 5afa2ddd .config console log report ci-upstream-linux-next-kasan-gce-root
2020/05/06 02:30 linux-next ac935d227366 35b8eb30 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.