syzbot


WARNING: proc registration bug in hashlimit_mt_check_common

Status: fixed on 2020/04/15 17:19
Subsystems: netfilter
[Documentation on labels]
Reported-by: syzbot+d195fd3b9a364ddd6731@syzkaller.appspotmail.com
Fix commit: 99b79c3900d4 netfilter: xt_hashlimit: unregister proc file before releasing mutex
First crash: 1589d, last: 1564d
Cause bisection: introduced by (bisect log) :
commit 8d0015a7ab76b8b1e89a3e5f5710a6e5103f2dd5
Author: Cong Wang <xiyou.wangcong@gmail.com>
Date: Mon Feb 3 04:30:53 2020 +0000

  netfilter: xt_hashlimit: limit the max size of hashtable

Crash: WARNING: proc registration bug in hashlimit_mt_check_common (log)
Repro: C syz .config
  
Discussions (5)
Title Replies (including bot) Last reply
[PATCH 5.5 000/189] 5.5.9-stable review 206 (206) 2020/03/25 17:53
[PATCH 5.4 00/60] 5.4.27-rc1 review 68 (68) 2020/03/21 18:18
[PATCH 0/6] Netfilter fixes for net 8 (8) 2020/02/27 00:32
[Patch nf] netfilter: xt_hashlimit: unregister proc file before releasing mutex 7 (7) 2020/02/26 19:14
WARNING: proc registration bug in hashlimit_mt_check_common 1 (2) 2020/02/10 23:07
Last patch testing requests (1)
Created Duration User Patch Repo Result
2020/02/13 06:14 18m xiyou.wangcong@gmail.com https://github.com/congwang/linux.git nf OK

Sample crash report:
xt_hashlimit: max too large, truncated to 1048576
------------[ cut here ]------------
proc_dir_entry 'ip6t_hashlimit/hsr0' already registered
WARNING: CPU: 1 PID: 10346 at fs/proc/generic.c:362 proc_register+0x41e/0x590 fs/proc/generic.c:362
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 10346 Comm: syz-executor457 Not tainted 5.6.0-rc2-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+0x197/0x210 lib/dump_stack.c:118
 panic+0x2e3/0x75c kernel/panic.c:221
 __warn.cold+0x2f/0x3e kernel/panic.c:582
 report_bug+0x289/0x300 lib/bug.c:195
 fixup_bug arch/x86/kernel/traps.c:174 [inline]
 fixup_bug arch/x86/kernel/traps.c:169 [inline]
 do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:267
 do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:286
 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027
RIP: 0010:proc_register+0x41e/0x590 fs/proc/generic.c:362
Code: ff df 48 89 f9 48 c1 e9 03 80 3c 01 00 0f 85 5a 01 00 00 48 8b 45 d0 48 c7 c7 20 14 59 88 48 8b b0 d0 00 00 00 e8 e1 e0 5e ff <0f> 0b 48 c7 c7 a0 2d cb 89 e8 e4 42 09 06 48 8b 4d a0 48 b8 00 00
RSP: 0018:ffffc90001f57548 EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffff8880a92e9f30 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815eae46 RDI: fffff520003eae9b
RBP: ffffc90001f575b0 R08: ffff88809220a340 R09: fffffbfff16a356e
R10: fffffbfff16a356d R11: ffffffff8b51ab6f R12: ffff888099127140
R13: 0000000000000000 R14: ffff8880991270b8 R15: dffffc0000000000
 proc_create_seq_private+0x12b/0x190 fs/proc/generic.c:593
 htable_create net/netfilter/xt_hashlimit.c:341 [inline]
 hashlimit_mt_check_common.isra.0+0xb30/0x1680 net/netfilter/xt_hashlimit.c:902
 hashlimit_mt_check_v2+0x327/0x3b0 net/netfilter/xt_hashlimit.c:946
 xt_check_match+0x280/0x690 net/netfilter/x_tables.c:501
 check_match net/ipv6/netfilter/ip6_tables.c:489 [inline]
 find_check_match net/ipv6/netfilter/ip6_tables.c:506 [inline]
 find_check_entry.isra.0+0x389/0x9d0 net/ipv6/netfilter/ip6_tables.c:557
 translate_table+0xd15/0x1860 net/ipv6/netfilter/ip6_tables.c:734
 do_replace net/ipv6/netfilter/ip6_tables.c:1153 [inline]
 do_ip6t_set_ctl+0x2fe/0x4c8 net/ipv6/netfilter/ip6_tables.c:1681
 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline]
 nf_setsockopt+0x77/0xd0 net/netfilter/nf_sockopt.c:115
 ipv6_setsockopt net/ipv6/ipv6_sockglue.c:949 [inline]
 ipv6_setsockopt+0x147/0x180 net/ipv6/ipv6_sockglue.c:933
 tcp_setsockopt net/ipv4/tcp.c:3165 [inline]
 tcp_setsockopt+0x8f/0xe0 net/ipv4/tcp.c:3159
 sock_common_setsockopt+0x94/0xd0 net/core/sock.c:3149
 __sys_setsockopt+0x261/0x4c0 net/socket.c:2130
 __do_sys_setsockopt net/socket.c:2146 [inline]
 __se_sys_setsockopt net/socket.c:2143 [inline]
 __x64_sys_setsockopt+0xbe/0x150 net/socket.c:2143
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x446769
Code: e8 0c e8 ff ff 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 5b 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f0edf2d1da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00000000006dbc38 RCX: 0000000000446769
RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000004
RBP: 00000000006dbc30 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000020000000 R11: 0000000000000246 R12: 00000000006dbc3c
R13: 0000000020000000 R14: 00000000004ae628 R15: 0000000000000001
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (320):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/02/23 09:35 upstream 54dedb5b571d 2c36e7a7 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/03/05 06:58 linux-next c99b17ac0399 c88c7b75 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/02/19 21:45 linux-next 1d7f85df0f9c b690a6e3 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/02/15 22:37 linux-next 9f01828e9e16 5d7b90f1 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/02/15 05:12 linux-next 9f01828e9e16 5d7b90f1 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/02/10 05:00 linux-next 2981de746b18 35f5e45e .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/03/06 10:47 upstream 63623fd44972 c88c7b75 .config console log report syz ci-upstream-kasan-gce-root
2020/03/04 09:37 upstream 63623fd44972 c88c7b75 .config console log report syz ci-upstream-kasan-gce-smack-root
2020/03/02 11:43 upstream 63623fd44972 c88c7b75 .config console log report syz ci-upstream-kasan-gce
2020/03/06 20:46 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/06 18:51 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-selinux-root
2020/03/06 15:58 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/06 09:53 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/06 03:06 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-smack-root
2020/03/05 22:30 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/05 19:40 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-smack-root
2020/03/05 18:28 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/05 16:20 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/05 14:29 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/05 08:37 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/05 06:45 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-selinux-root
2020/03/05 05:20 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-selinux-root
2020/03/05 02:04 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/04 21:01 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/04 16:35 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/04 15:30 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/04 14:08 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-smack-root
2020/03/04 11:24 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/04 07:49 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/04 05:51 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-selinux-root
2020/03/04 03:37 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-smack-root
2020/03/03 23:36 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-root
2020/03/03 19:54 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/03 16:13 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/03 14:02 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-smack-root
2020/03/03 12:31 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/03 10:52 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/03 04:54 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/03 03:48 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/02 23:26 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-selinux-root
2020/03/02 17:58 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/02 14:07 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce
2020/03/02 12:47 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-smack-root
2020/03/02 11:13 upstream 63623fd44972 c88c7b75 .config console log report ci-upstream-kasan-gce-selinux-root
2020/03/06 05:49 net-old 3614d05b5e6b c88c7b75 .config console log report ci-upstream-net-this-kasan-gce
2020/03/05 13:09 net-old 3614d05b5e6b c88c7b75 .config console log report ci-upstream-net-this-kasan-gce
2020/03/04 18:33 net-old 3614d05b5e6b c88c7b75 .config console log report ci-upstream-net-this-kasan-gce
2020/03/04 13:07 net-old 3614d05b5e6b c88c7b75 .config console log report ci-upstream-net-this-kasan-gce
2020/03/03 07:27 net-old 3614d05b5e6b c88c7b75 .config console log report ci-upstream-net-this-kasan-gce
2020/03/03 02:09 net-old 3614d05b5e6b c88c7b75 .config console log report ci-upstream-net-this-kasan-gce
2020/03/02 22:04 net-old 3614d05b5e6b c88c7b75 .config console log report ci-upstream-net-this-kasan-gce
2020/03/02 19:40 net-old 3614d05b5e6b c88c7b75 .config console log report ci-upstream-net-this-kasan-gce
2020/03/02 15:14 net-old 3614d05b5e6b c88c7b75 .config console log report ci-upstream-net-this-kasan-gce
2020/03/04 09:20 net-next-old 3b3e808cd883 c88c7b75 .config console log report ci-upstream-net-kasan-gce
2020/03/04 04:49 net-next-old 3b3e808cd883 c88c7b75 .config console log report ci-upstream-net-kasan-gce
2020/03/03 06:00 net-next-old 3b3e808cd883 c88c7b75 .config console log report ci-upstream-net-kasan-gce
2020/03/02 08:43 net-next-old 3b3e808cd883 c88c7b75 .config console log report ci-upstream-net-kasan-gce
2020/03/06 14:55 linux-next c99b17ac0399 c88c7b75 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/05 20:56 linux-next c99b17ac0399 c88c7b75 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/05 09:56 linux-next c99b17ac0399 c88c7b75 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/03/02 07:26 linux-next c99b17ac0399 c88c7b75 .config console log report ci-upstream-linux-next-kasan-gce-root
2020/02/10 03:53 linux-next 2981de746b18 35f5e45e .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.