general protection fault in rhashtable_walk_start_check

瀏覽次數:19 次
跳到第一則未讀訊息

syzbot

未讀,
2018年9月2日 凌晨1:11:042018/9/2
收件者:da...@davemloft.net、jon....@ericsson.com、linux-...@vger.kernel.org、net...@vger.kernel.org、syzkall...@googlegroups.com、tipc-di...@lists.sourceforge.net、ying...@windriver.com
Hello,

syzbot found the following crash on:

HEAD commit: f611a5b4a51f ibmvnic: Include missing return code checks i..
git tree: net
console output: https://syzkaller.appspot.com/x/log.txt?x=15ecaa46400000
kernel config: https://syzkaller.appspot.com/x/.config?x=531a917630d2a492
dashboard link: https://syzkaller.appspot.com/bug?extid=e93a2c41f91b8e2c7d9b
compiler: gcc (GCC) 8.0.1 20180413 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15cb3cb2400000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12d56e3e400000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+e93a2c...@syzkaller.appspotmail.com

random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
CPU: 0 PID: 4663 Comm: syz-executor272 Not tainted 4.19.0-rc1+ #78
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:rhashtable_walk_start_check+0xd3/0x1400 lib/rhashtable.c:717
Code: f2 c7 40 30 f2 f2 f2 f2 c7 40 34 00 f2 f2 f2 65 48 8b 04 25 28 00 00
00 48 89 45 d0 31 c0 e8 94 9e 0b fe 4c 89 e8 48 c1 e8 03 <80> 3c 18 00 0f
85 a4 0f 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b
RSP: 0018:ffff8801ba726ee8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffffffff852abf68
RDX: 0000000000000000 RSI: ffffffff837121ec RDI: 0000000000000000
RBP: ffff8801ba727130 R08: ffff8801ba750780 R09: ffffed00374fcf3c
R10: ffffed00374fcf3c R11: ffff8801ba7e79e3 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8801ba727270 R15: fffffffffffff000
FS: 0000000001b0b880(0000) GS:ffff8801db000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000100 CR3: 00000001bbf40000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
rhashtable_walk_start include/linux/rhashtable.h:244 [inline]
tipc_nl_sk_walk+0x52/0x1d0 net/tipc/socket.c:3236
tipc_nl_sk_dump+0x24/0x30 net/tipc/socket.c:3366
__tipc_nl_compat_dumpit.isra.11+0x20b/0xad0 net/tipc/netlink_compat.c:192
tipc_nl_compat_dumpit+0x1f4/0x440 net/tipc/netlink_compat.c:265
tipc_nl_compat_handle net/tipc/netlink_compat.c:1142 [inline]
tipc_nl_compat_recv+0x12b3/0x19a0 net/tipc/netlink_compat.c:1205
genl_family_rcv_msg+0x8a3/0x1140 net/netlink/genetlink.c:601
genl_rcv_msg+0xc6/0x168 net/netlink/genetlink.c:626
netlink_rcv_skb+0x172/0x440 net/netlink/af_netlink.c:2454
genl_rcv+0x28/0x40 net/netlink/genetlink.c:637
netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
netlink_unicast+0x5a0/0x760 net/netlink/af_netlink.c:1343
netlink_sendmsg+0xa18/0xfc0 net/netlink/af_netlink.c:1908
sock_sendmsg_nosec net/socket.c:621 [inline]
sock_sendmsg+0xd5/0x120 net/socket.c:631
___sys_sendmsg+0x7fd/0x930 net/socket.c:2114
__sys_sendmsg+0x11d/0x290 net/socket.c:2152
__do_sys_sendmsg net/socket.c:2161 [inline]
__se_sys_sendmsg net/socket.c:2159 [inline]
__x64_sys_sendmsg+0x78/0xb0 net/socket.c:2159
do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4400e9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffe84ec3538 EFLAGS: 00000213 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004400e9
RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000213 R12: 0000000000401970
R13: 0000000000401a00 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
Dumping ftrace buffer:
(ftrace buffer empty)
---[ end trace c8a9aaea5d0de646 ]---
RIP: 0010:rhashtable_walk_start_check+0xd3/0x1400 lib/rhashtable.c:717
Code: f2 c7 40 30 f2 f2 f2 f2 c7 40 34 00 f2 f2 f2 65 48 8b 04 25 28 00 00
00 48 89 45 d0 31 c0 e8 94 9e 0b fe 4c 89 e8 48 c1 e8 03 <80> 3c 18 00 0f
85 a4 0f 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b
RSP: 0018:ffff8801ba726ee8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffffffff852abf68
RDX: 0000000000000000 RSI: ffffffff837121ec RDI: 0000000000000000
RBP: ffff8801ba727130 R08: ffff8801ba750780 R09: ffffed00374fcf3c
R10: ffffed00374fcf3c R11: ffff8801ba7e79e3 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8801ba727270 R15: fffffffffffff000
FS: 0000000001b0b880(0000) GS:ffff8801db000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000100 CR3: 00000001bbf40000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with
syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

未讀,
2018年9月3日 晚上9:11:022018/9/3
收件者:syzkall...@googlegroups.com、xiyou.w...@gmail.com
Hello,

syzbot has tested the proposed patch but the reproducer still triggered
crash:
INFO: rcu detected stall in tipc_sk_lookup

8021q: adding VLAN 0 to HW filter on device team0
8021q: adding VLAN 0 to HW filter on device team0
8021q: adding VLAN 0 to HW filter on device team0
8021q: adding VLAN 0 to HW filter on device team0
8021q: adding VLAN 0 to HW filter on device team0
rcu: INFO: rcu_sched self-detected stall on CPU
rcu: 0-....: (1 GPs behind) idle=10e/1/0x4000000000000002
softirq=16696/16697 fqs=26246
rcu: (t=105008 jiffies g=35929 q=2299)
NMI backtrace for cpu 0
CPU: 0 PID: 6791 Comm: syz-executor3 Not tainted 4.19.0-rc1+ #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113
nmi_cpu_backtrace.cold.3+0x48/0x88 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x151/0x192 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_single_cpu_backtrace include/linux/nmi.h:162 [inline]
rcu_dump_cpu_stacks+0x175/0x1c2 kernel/rcu/tree.c:1340
print_cpu_stall.cold.78+0x2fb/0x59c kernel/rcu/tree.c:1478
check_cpu_stall kernel/rcu/tree.c:1550 [inline]
__rcu_pending kernel/rcu/tree.c:3276 [inline]
rcu_pending kernel/rcu/tree.c:3319 [inline]
rcu_check_callbacks+0xd4a/0x15a0 kernel/rcu/tree.c:2665
update_process_times+0x2d/0x70 kernel/time/timer.c:1636
tick_sched_handle+0x9f/0x180 kernel/time/tick-sched.c:164
tick_sched_timer+0x45/0x130 kernel/time/tick-sched.c:1274
__run_hrtimer kernel/time/hrtimer.c:1398 [inline]
__hrtimer_run_queues+0x3eb/0xff0 kernel/time/hrtimer.c:1460
hrtimer_interrupt+0x2f3/0x750 kernel/time/hrtimer.c:1518
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1029 [inline]
smp_apic_timer_interrupt+0x16d/0x6a0 arch/x86/kernel/apic/apic.c:1054
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:864
</IRQ>
RIP: 0010:debug_lockdep_rcu_enabled+0x31/0x90 kernel/rcu/update.c:252
Code: 55 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 14 02 48
89 f8 48 89 e5 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 4c <8b> 15 c5 7e 49
07 85 d2 74 3e 48 c7 c7 80 f3 4c 88 48 b8 00 00 00
RSP: 0018:ffff8801ba5ae8b8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000007 RBX: 0000000000000000 RCX: 00000000fffff8f8
RDX: 0000000000000000 RSI: ffffffff869ca1fd RDI: ffffffff88afe30c
RBP: ffff8801ba5ae8b8 R08: ffff8801bafde040 R09: ffffed003b6046de
R10: ffffed003b6046de R11: ffff8801db0236f3 R12: 0000000000000000
R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000001
rcu_read_unlock include/linux/rcupdate.h:679 [inline]
rhashtable_lookup_fast include/linux/rhashtable.h:543 [inline]
tipc_sk_lookup+0x7f2/0xf90 net/tipc/socket.c:2686
tipc_nl_publ_dump+0x243/0xfaa net/tipc/socket.c:3489
__tipc_nl_compat_dumpit.isra.11+0x23c/0xb20 net/tipc/netlink_compat.c:193
tipc_nl_compat_publ_dump net/tipc/netlink_compat.c:922 [inline]
tipc_nl_compat_sk_dump+0x87c/0xca0 net/tipc/netlink_compat.c:970
__tipc_nl_compat_dumpit.isra.11+0x368/0xb20 net/tipc/netlink_compat.c:202
tipc_nl_compat_dumpit+0x1f4/0x440 net/tipc/netlink_compat.c:267
tipc_nl_compat_handle net/tipc/netlink_compat.c:1144 [inline]
tipc_nl_compat_recv+0x12b3/0x19a0 net/tipc/netlink_compat.c:1207
genl_family_rcv_msg+0x8a3/0x1140 net/netlink/genetlink.c:601
genl_rcv_msg+0xc6/0x168 net/netlink/genetlink.c:626
netlink_rcv_skb+0x172/0x440 net/netlink/af_netlink.c:2454
genl_rcv+0x28/0x40 net/netlink/genetlink.c:637
netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline]
netlink_unicast+0x5a0/0x760 net/netlink/af_netlink.c:1343
netlink_sendmsg+0xa18/0xfc0 net/netlink/af_netlink.c:1908
sock_sendmsg_nosec net/socket.c:621 [inline]
sock_sendmsg+0xd5/0x120 net/socket.c:631
___sys_sendmsg+0x7fd/0x930 net/socket.c:2114
__sys_sendmsg+0x11d/0x290 net/socket.c:2152
__do_sys_sendmsg net/socket.c:2161 [inline]
__se_sys_sendmsg net/socket.c:2159 [inline]
__x64_sys_sendmsg+0x78/0xb0 net/socket.c:2159
do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x457099
Code: fd b4 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 b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f0254489c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f025448a6d4 RCX: 0000000000457099
RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000003
RBP: 00000000009300a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000004d4860 R14: 00000000004c8ebd R15: 0000000000000000


Tested on:

commit: f80be81deeef tipc: orphan sock in tipc_release()
git tree: https://github.com/congwang/linux.git tipc
console output: https://syzkaller.appspot.com/x/log.txt?x=1239710a400000
kernel config: https://syzkaller.appspot.com/x/.config?x=531a917630d2a492

syzbot

未讀,
2018年9月4日 下午3:29:042018/9/4
收件者:syzkall...@googlegroups.com、xiyou.w...@gmail.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger
crash:

Reported-and-tested-by:
syzbot+e93a2c...@syzkaller.appspotmail.com

Tested on:

commit: dcb73635656a tipc: call start and done ops directly in __t..
kernel config: https://syzkaller.appspot.com/x/.config?x=531a917630d2a492
compiler: gcc (GCC) 8.0.1 20180413 (experimental)

Note: testing is done by a robot and is best-effort only.
回覆所有人
回覆作者
轉寄
0 則新訊息