BUG: soft lockup in __perf_sw_event

8 views
Skip to first unread message

syzbot

unread,
May 4, 2021, 5:59:30 PM5/4/21
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 7d7d1c0a Linux 4.14.232
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1009df15d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=17ee8a0e183900d8
dashboard link: https://syzkaller.appspot.com/bug?extid=273e8da41acf6c1d7956
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1345ae7dd00000

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

batman_adv: batadv0: Interface activated: batadv_slave_1
IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready
watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [syz-executor.1:9587]
Modules linked in:
irq event stamp: 40450
hardirqs last enabled at (40449): [<ffffffff87400976>] restore_regs_and_return_to_kernel+0x0/0x2a
hardirqs last disabled at (40450): [<ffffffff874018ae>] apic_timer_interrupt+0x8e/0xa0 arch/x86/entry/entry_64.S:793
softirqs last enabled at (36194): [<ffffffff8760068b>] __do_softirq+0x68b/0x9ff kernel/softirq.c:314
softirqs last disabled at (35883): [<ffffffff81320c83>] invoke_softirq kernel/softirq.c:368 [inline]
softirqs last disabled at (35883): [<ffffffff81320c83>] irq_exit+0x193/0x240 kernel/softirq.c:409
CPU: 0 PID: 9587 Comm: syz-executor.1 Not tainted 4.14.232-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff88809767e6c0 task.stack: ffff88809cc30000
RIP: 0010:cpu_clock_event_update kernel/events/core.c:8831 [inline]
RIP: 0010:cpu_clock_event_read+0x1f/0x30 kernel/events/core.c:8862
RSP: 0018:ffff88809cc37280 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff10
RAX: 000000f9a978d3d4 RBX: ffff888097fc4040 RCX: 0000000000000001
RDX: 000000f9a978d346 RSI: 0000000000000000 RDI: 0000000000000001
RBP: ffff88809cc37370 R08: ffff88823fff7018 R09: ffff88823fff700f
R10: ffff88823fff7017 R11: 000000fba3f55f2f R12: dffffc0000000000
R13: ffffed1013986eaa R14: ffff88809cc37528 R15: 0000000000000010
FS: 00007f90aef14700(0000) GS:ffff8880ba400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020f5e000 CR3: 00000000a2adf000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
perf_output_read_group kernel/events/core.c:5891 [inline]
perf_output_read+0xc28/0x1090 kernel/events/core.c:5930
perf_output_sample+0xa28/0x16f0 kernel/events/core.c:5972
__perf_event_output kernel/events/core.c:6285 [inline]
perf_event_output_forward+0xf8/0x1f0 kernel/events/core.c:6298
__perf_event_overflow+0x113/0x310 kernel/events/core.c:7547
perf_swevent_overflow kernel/events/core.c:7623 [inline]
perf_swevent_event+0x299/0x460 kernel/events/core.c:7651
do_perf_sw_event kernel/events/core.c:7764 [inline]
___perf_sw_event+0x2a1/0x480 kernel/events/core.c:7795
__perf_sw_event+0x4f/0x100 kernel/events/core.c:7807
perf_sw_event include/linux/perf_event.h:1046 [inline]
__do_page_fault+0x692/0xad0 arch/x86/mm/fault.c:1483
page_fault+0x25/0x50 arch/x86/entry/entry_64.S:1123
RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:181
RSP: 0018:ffff88809cc37a78 EFLAGS: 00010206
RAX: ffffed10130a488a RBX: 000000000000444a RCX: 0000000000003f15
RDX: 000000000000444a RSI: 0000000020f5e000 RDI: ffff888098520535
RBP: 0000000020f5dacb R08: 0000000000000001 R09: ffffed10130a4889
R10: ffff888098524449 R11: 0000000000000000 R12: ffff888098520000
R13: 00007ffffffff000 R14: 0000000020f61f15 R15: ffff888098520000
copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
raw_copy_from_user arch/x86/include/asm/uaccess_64.h:55 [inline]
copyin+0x99/0xc0 lib/iov_iter.c:146
_copy_from_iter_full+0x197/0x690 lib/iov_iter.c:608
copy_from_iter_full include/linux/uio.h:126 [inline]
skb_do_copy_data_nocache include/net/sock.h:1889 [inline]
skb_copy_to_page_nocache include/net/sock.h:1915 [inline]
tcp_sendmsg_locked+0x23fc/0x2ef0 net/ipv4/tcp.c:1360
tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1457
inet_sendmsg+0x11a/0x4e0 net/ipv4/af_inet.c:762
sock_sendmsg_nosec net/socket.c:646 [inline]
sock_sendmsg+0xb5/0x100 net/socket.c:656
SYSC_sendto net/socket.c:1763 [inline]
SyS_sendto+0x1c7/0x2c0 net/socket.c:1731
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x4665f9
RSP: 002b:00007f90aef14188 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665f9
RDX: ffffffffffffffef RSI: 0000000020d7cfcb RDI: 0000000000000006
RBP: 00000000004bfce1 R08: 0000000000000000 R09: 0000000000000053
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffef143cabf R14: 00007f90aef14300 R15: 0000000000022000
Code: 24 e8 06 79 1b 00 48 8b 04 24 eb d6 53 48 89 fb e8 97 d1 f1 ff 65 8b 3d 50 2d 9e 7e e8 4b 23 d7 ff 48 89 c2 48 87 93 c8 01 00 00 <48> 29 d0 48 01 83 90 00 00 00 5b c3 0f 1f 44 00 00 41 57 49 89
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at pc 0xffffffff8722b3ee


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Dec 21, 2021, 1:13:23 AM12/21/21
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 9dfbac0e6b86 Linux 4.14.258
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1266f693b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=9cac3dc48a267418
dashboard link: https://syzkaller.appspot.com/bug?extid=273e8da41acf6c1d7956
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16bc6ea5b00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1452cc95b00000

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

watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [syz-executor700:23334]
Modules linked in:
irq event stamp: 22194
hardirqs last enabled at (22193): [<ffffffff87400976>] restore_regs_and_return_to_kernel+0x0/0x2a
hardirqs last disabled at (22194): [<ffffffff874018ae>] apic_timer_interrupt+0x8e/0xa0 arch/x86/entry/entry_64.S:793 arch/x86/entry/entry_64.S:793
softirqs last enabled at (18012): [<ffffffff8760068b>] __do_softirq+0x68b/0x9ff kernel/softirq.c:314 kernel/softirq.c:314
softirqs last disabled at (17971): [<ffffffff81321d13>] invoke_softirq kernel/softirq.c:368 [inline]
softirqs last disabled at (17971): [<ffffffff81321d13>] invoke_softirq kernel/softirq.c:368 [inline] kernel/softirq.c:409
softirqs last disabled at (17971): [<ffffffff81321d13>] irq_exit+0x193/0x240 kernel/softirq.c:409 kernel/softirq.c:409
CPU: 0 PID: 23334 Comm: syz-executor700 Not tainted 4.14.258-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff888097bb6340 task.stack: ffff88809bbd8000
RIP: 0010:memcpy+0xc/0x50 mm/kasan/kasan.c:301 mm/kasan/kasan.c:301
RSP: 0018:ffff88809bbdf278 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff10
RAX: ffffed101377bea8 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffff88809bbdf360 RDI: ffff8880a1eafcf8
RBP: ffff88809bbdf360 R08: ffff88823fff7018 R09: ffff88823fff700f
R10: ffff88823fff7017 R11: 0000010163cfb707 R12: 0000000000000008
R13: ffff88809bbdf360 R14: ffff88809bbdf528 R15: 0000000000000008
FS: 00007f56fb176700(0000) GS:ffff8880ba400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020e37000 CR3: 00000000ab0bd000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
memcpy include/linux/string.h:376 [inline]
memcpy_common kernel/events/internal.h:172 [inline]
__output_copy kernel/events/internal.h:176 [inline]
perf_output_read_group kernel/events/core.c:5899 [inline]
memcpy include/linux/string.h:376 [inline] kernel/events/core.c:5932
memcpy_common kernel/events/internal.h:172 [inline] kernel/events/core.c:5932
__output_copy kernel/events/internal.h:176 [inline] kernel/events/core.c:5932
perf_output_read_group kernel/events/core.c:5899 [inline] kernel/events/core.c:5932
perf_output_read+0x6c9/0x1090 kernel/events/core.c:5932 kernel/events/core.c:5932
perf_output_sample+0xa28/0x16f0 kernel/events/core.c:5974 kernel/events/core.c:5974
__perf_event_output kernel/events/core.c:6287 [inline]
__perf_event_output kernel/events/core.c:6287 [inline] kernel/events/core.c:6300
perf_event_output_forward+0xf8/0x1f0 kernel/events/core.c:6300 kernel/events/core.c:6300
__perf_event_overflow+0x113/0x310 kernel/events/core.c:7549 kernel/events/core.c:7549
perf_swevent_overflow kernel/events/core.c:7625 [inline]
perf_swevent_overflow kernel/events/core.c:7625 [inline] kernel/events/core.c:7653
perf_swevent_event+0x299/0x460 kernel/events/core.c:7653 kernel/events/core.c:7653
do_perf_sw_event kernel/events/core.c:7766 [inline]
do_perf_sw_event kernel/events/core.c:7766 [inline] kernel/events/core.c:7797
___perf_sw_event+0x2a1/0x480 kernel/events/core.c:7797 kernel/events/core.c:7797
__perf_sw_event+0x4f/0x100 kernel/events/core.c:7809 kernel/events/core.c:7809
perf_sw_event include/linux/perf_event.h:1046 [inline]
perf_sw_event include/linux/perf_event.h:1046 [inline] arch/x86/mm/fault.c:1483
__do_page_fault+0x692/0xad0 arch/x86/mm/fault.c:1483 arch/x86/mm/fault.c:1483
page_fault+0x25/0x50 arch/x86/entry/entry_64.S:1123 arch/x86/entry/entry_64.S:1123
RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:181 arch/x86/lib/copy_user_64.S:181
RSP: 0018:ffff88809bbdfa60 EFLAGS: 00050206
RAX: ffffed1011eea000 RBX: 0000000000008000 RCX: 0000000000006acb
RDX: 0000000000008000 RSI: 0000000020e37000 RDI: ffff88808f749535
RBP: 0000000020e35acb R08: 0000000000000001 R09: ffffed1011ee9fff
R10: ffff88808f74ffff R11: 0000000000000000 R12: ffff88808f748000
R13: 00007ffffffff000 R14: 0000000020e3dacb R15: ffff8880b17b4540
copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
raw_copy_from_user arch/x86/include/asm/uaccess_64.h:55 [inline]
copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] lib/iov_iter.c:146
raw_copy_from_user arch/x86/include/asm/uaccess_64.h:55 [inline] lib/iov_iter.c:146
copyin+0x99/0xc0 lib/iov_iter.c:146 lib/iov_iter.c:146
_copy_from_iter_full+0x19c/0x760 lib/iov_iter.c:608 lib/iov_iter.c:608
copy_from_iter_full include/linux/uio.h:126 [inline]
skb_do_copy_data_nocache include/net/sock.h:1892 [inline]
skb_copy_to_page_nocache include/net/sock.h:1918 [inline]
copy_from_iter_full include/linux/uio.h:126 [inline] net/ipv4/tcp.c:1360
skb_do_copy_data_nocache include/net/sock.h:1892 [inline] net/ipv4/tcp.c:1360
skb_copy_to_page_nocache include/net/sock.h:1918 [inline] net/ipv4/tcp.c:1360
tcp_sendmsg_locked+0x23fc/0x2ef0 net/ipv4/tcp.c:1360 net/ipv4/tcp.c:1360
tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1457 net/ipv4/tcp.c:1457
inet_sendmsg+0x11a/0x4e0 net/ipv4/af_inet.c:762 net/ipv4/af_inet.c:762
sock_sendmsg_nosec net/socket.c:646 [inline]
sock_sendmsg_nosec net/socket.c:646 [inline] net/socket.c:656
sock_sendmsg+0xb5/0x100 net/socket.c:656 net/socket.c:656
SYSC_sendto net/socket.c:1763 [inline]
SYSC_sendto net/socket.c:1763 [inline] net/socket.c:1731
SyS_sendto+0x1c7/0x2c0 net/socket.c:1731 net/socket.c:1731
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7f56fb1c9529
RSP: 002b:00007f56fb176308 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007f56fb2534e8 RCX: 00007f56fb1c9529
RDX: ffffffffffffffef RSI: 0000000020d7cfcb RDI: 0000000000000006
RBP: 00007f56fb2534e0 R08: 0000000000000000 R09: 0000000000000053
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f56fb21f664
R13: 00007ffd92bd4eff R14: 00007f56fb176400 R15: 0000000000022000
Code: 1b fa ff ff 4c 89 e2 4c 89 ee 48 89 ef 5d 41 5c 41 5d e9 28 c2 81 05 0f 1f 84 00 00 00 00 00 41 55 49 89 f5 41 54 49 89 d4 31 d2 <55> 48 8b 4c 24 18 48 89 fd 4c 89 e6 4c 89 ef e8 e0 f9 ff ff 48
----------------
Code disassembly (best guess), 3 bytes skipped:
0: ff 4c 89 e2 decl -0x1e(%rcx,%rcx,4)
4: 4c 89 ee mov %r13,%rsi
7: 48 89 ef mov %rbp,%rdi
a: 5d pop %rbp
b: 41 5c pop %r12
d: 41 5d pop %r13
f: e9 28 c2 81 05 jmpq 0x581c23c
14: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
1b: 00
1c: 41 55 push %r13
1e: 49 89 f5 mov %rsi,%r13
21: 41 54 push %r12
23: 49 89 d4 mov %rdx,%r12
26: 31 d2 xor %edx,%edx
* 28: 55 push %rbp <-- trapping instruction
29: 48 8b 4c 24 18 mov 0x18(%rsp),%rcx
2e: 48 89 fd mov %rdi,%rbp
31: 4c 89 e6 mov %r12,%rsi
34: 4c 89 ef mov %r13,%rdi
37: e8 e0 f9 ff ff callq 0xfffffa1c
3c: 48 rex.W
----------------
Code disassembly (best guess), 3 bytes skipped:
0: ff 4c 89 e2 decl -0x1e(%rcx,%rcx,4)
4: 4c 89 ee mov %r13,%rsi
7: 48 89 ef mov %rbp,%rdi
a: 5d pop %rbp
b: 41 5c pop %r12
d: 41 5d pop %r13
f: e9 28 c2 81 05 jmpq 0x581c23c
14: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
1b: 00
1c: 41 55 push %r13
1e: 49 89 f5 mov %rsi,%r13
21: 41 54 push %r12
23: 49 89 d4 mov %rdx,%r12
26: 31 d2 xor %edx,%edx
* 28: 55 push %rbp <-- trapping instruction
29: 48 8b 4c 24 18 mov 0x18(%rsp),%rcx
2e: 48 89 fd mov %rdi,%rbp
31: 4c 89 e6 mov %r12,%rsi
34: 4c 89 ef mov %r13,%rdi
37: e8 e0 f9 ff ff callq 0xfffffa1c
3c: 48 rex.W

Reply all
Reply to author
Forward
0 new messages