general protection fault in account_system_index_time (2)

2 views
Skip to first unread message

syzbot

unread,
Nov 22, 2018, 11:50:04 AM11/22/18
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: d59da3fbfe3f net: lpc_eth: fix trivial comment typo
git tree: net-next
console output: https://syzkaller.appspot.com/x/log.txt?x=110df225400000
kernel config: https://syzkaller.appspot.com/x/.config?x=c36a72af2123e78a
dashboard link: https://syzkaller.appspot.com/bug?extid=137ed32ec9a6d5b0d5fe
compiler: gcc (GCC) 8.0.1 20180413 (experimental)
CC: [ak...@linux-foundation.org hmcla...@fb.com
j...@perches.com linux-...@vger.kernel.org linu...@kvack.org
mho...@suse.com rien...@google.com]

Unfortunately, I don't have any reproducer for this crash yet.

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

Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
kasan: CONFIG_KASAN_INLINE enabled
Call Trace:
kasan: GPF could be caused by NULL-ptr deref or user memory access
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x244/0x39d lib/dump_stack.c:113
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 9 Comm:
�ف���Pc�v����Dc�v Not tainted 4.20.0-rc3+ #308
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:__read_once_size include/linux/compiler.h:182 [inline]
RIP: 0010:get_running_cputimer include/linux/sched/cputime.h:85 [inline]
RIP: 0010:account_group_system_time include/linux/sched/cputime.h:149
[inline]
RIP: 0010:account_system_index_time+0xef/0x5d0 kernel/sched/cputime.c:168
fail_dump lib/fault-inject.c:51 [inline]
should_fail.cold.4+0xa/0x17 lib/fault-inject.c:149
Code: b5 04 00 00 48 8b 83 00 07 00 00 48 ba 00 00 00 00 00 fc ff df 48 8d
b8 40 01 00 00 48 8d 88 28 01 00 00 48 89 fe 48 c1 ee 03 <0f> b6 14 16 48
89 fe 83 e6 07 40 38 f2 7f 08 84 d2 0f 85 01 04 00
RSP: 0018:ffff8881dae07950 EFLAGS: 00010006
RAX: fffffffffffffff8 RBX: ffff8881d9af0240 RCX: 0000000000000120
RDX: dffffc0000000000 RSI: 0000000000000027 RDI: 0000000000000138
RBP: ffff8881dae07a30 R08: ffff8881dae1f5f0 R09: 000000000000000a
R10: fffffbfff14a7001 R11: 0000000000000001 R12: ffffffffffffffff
R13: 00000000001feed4 R14: 1ffff1103b5c0f2d R15: ffff8881dae07a08
FS: 0000000000000000(0000) GS:ffff8881dae00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000625208 CR3: 00000001c3630000 CR4: 00000000001406f0
__should_failslab+0x124/0x180 mm/failslab.c:32
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
should_failslab+0x9/0x14 mm/slab_common.c:1578
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
slab_pre_alloc_hook mm/slab.h:423 [inline]
slab_alloc mm/slab.c:3378 [inline]
kmem_cache_alloc_trace+0x2d7/0x750 mm/slab.c:3618
Call Trace:
kmalloc include/linux/slab.h:546 [inline]
kzalloc include/linux/slab.h:741 [inline]
tcp_sendmsg_fastopen net/ipv4/tcp.c:1144 [inline]
tcp_sendmsg_locked+0x297f/0x3f70 net/ipv4/tcp.c:1208
<IRQ>
irqtime_account_process_tick.isra.6+0x38e/0x490 kernel/sched/cputime.c:380
account_process_tick+0x282/0x350 kernel/sched/cputime.c:483
update_process_times+0x21/0x70 kernel/time/timer.c:1634
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+0x41c/0x10d0 kernel/time/hrtimer.c:1460
tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1443
inet_sendmsg+0x1a1/0x690 net/ipv4/af_inet.c:798
sock_sendmsg_nosec net/socket.c:621 [inline]
sock_sendmsg+0xd5/0x120 net/socket.c:631
__sys_sendto+0x3d7/0x670 net/socket.c:1788
hrtimer_interrupt+0x313/0x780 kernel/time/hrtimer.c:1518
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1034 [inline]
smp_apic_timer_interrupt+0x1a1/0x760 arch/x86/kernel/apic/apic.c:1059
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:804
__do_sys_sendto net/socket.c:1800 [inline]
__se_sys_sendto net/socket.c:1796 [inline]
__x64_sys_sendto+0xe1/0x1a0 net/socket.c:1796
</IRQ>
do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
Modules linked in:
---[ end trace 769d0fabc97e2267 ]---
RIP: 0010:__read_once_size include/linux/compiler.h:182 [inline]
RIP: 0010:get_running_cputimer include/linux/sched/cputime.h:85 [inline]
RIP: 0010:account_group_system_time include/linux/sched/cputime.h:149
[inline]
RIP: 0010:account_system_index_time+0xef/0x5d0 kernel/sched/cputime.c:168
Code: b5 04 00 00 48 8b 83 00 07 00 00 48 ba 00 00 00 00 00 fc ff df 48 8d
b8 40 01 00 00 48 8d 88 28 01 00 00 48 89 fe 48 c1 ee 03 <0f> b6 14 16 48
89 fe 83 e6 07 40 38 f2 7f 08 84 d2 0f 85 01 04 00
RSP: 0018:ffff8881dae07950 EFLAGS: 00010006
RAX: fffffffffffffff8 RBX: ffff8881d9af0240 RCX: 0000000000000120
RDX: dffffc0000000000 RSI: 0000000000000027 RDI: 0000000000000138
RBP: ffff8881dae07a30 R08: ffff8881dae1f5f0 R09: 000000000000000a
entry_SYSCALL_64_after_hwframe+0x49/0xbe
R10: fffffbfff14a7001 R11: 0000000000000001 R12: ffffffffffffffff
RIP: 0033:0x457569
R13: 00000000001feed4 R14: 1ffff1103b5c0f2d R15: ffff8881dae07a08
Code: fd b3 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 b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00
FS: 0000000000000000(0000) GS:ffff8881dae00000(0000) knlGS:0000000000000000
RSP: 002b:00007f4c3be3ec78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
RAX: ffffffffffffffda RBX: 00007f4c3be3ec90 RCX: 0000000000457569
CR2: 0000000000625208 CR3: 00000001c3630000 CR4: 00000000001406f0
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
RBP: 000000000072bf00 R08: 0000000020e68000 R09: 0000000000000010
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
R10: 0000000020000000 R11: 0000000000000246 R12: 00007f4c3be3f6d4


---
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

unread,
Jan 3, 2019, 2:04:03 AM1/3/19
to syzkaller-upst...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 85f78456f286 Merge tag '9p-for-4.21' of git://github.com/m..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13d8c5e7400000
kernel config: https://syzkaller.appspot.com/x/.config?x=17c50660d3a88302
dashboard link: https://syzkaller.appspot.com/bug?extid=137ed32ec9a6d5b0d5fe
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=163fe5e7400000
CC: [fwei...@gmail.com linux-...@vger.kernel.org
mi...@kernel.org tg...@linutronix.de]

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

kasan: CONFIG_KASAN_INLINE enabled
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: -1751067384 Comm: > Not tainted 4.20.0+ #6
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:__read_once_size include/linux/compiler.h:191 [inline]
RIP: 0010:get_running_cputimer include/linux/sched/cputime.h:85 [inline]
RIP: 0010:account_group_system_time include/linux/sched/cputime.h:149
[inline]
RIP: 0010:account_system_index_time+0xe8/0x5f0 kernel/sched/cputime.c:168
Code: 04 00 00 49 8b 84 24 00 07 00 00 48 ba 00 00 00 00 00 fc ff df 48 8d
b8 40 01 00 00 48 8d 88 28 01 00 00 48 89 fe 48 c1 ee 03 <0f> b6 14 16 48
89 fe 83 e6 07 40 38 f2 7f 08 84 d2 0f 85 93 03 00
RSP: 0018:ffff8880ae707a80 EFLAGS: 00010006
RAX: 0000000000000000 RBX: 1ffff11015ce0f54 RCX: 0000000000000128
RDX: dffffc0000000000 RSI: 0000000000000028 RDI: 0000000000000140
RBP: ffff8880ae707b48 R08: ffff8880ae71f5f0 R09: ffffffff8a99f05d
R10: ffffffff8a99f050 R11: 0000000000000001 R12: ffff8880a94a6440
R13: 00000000009356d0 R14: 0000000000000003 R15: ffff8880ae707b20
FS: 0000000000000000(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000068 CR3: 0000000097294000 CR4: 00000000001406e0
Call Trace:
<IRQ>
irqtime_account_process_tick.isra.0+0x3a2/0x490 kernel/sched/cputime.c:380
account_process_tick+0x27f/0x350 kernel/sched/cputime.c:483
update_process_times+0x25/0x80 kernel/time/timer.c:1633
tick_sched_handle+0xa2/0x190 kernel/time/tick-sched.c:161
tick_sched_timer+0x47/0x130 kernel/time/tick-sched.c:1271
__run_hrtimer kernel/time/hrtimer.c:1389 [inline]
__hrtimer_run_queues+0x3a7/0x1050 kernel/time/hrtimer.c:1451
hrtimer_interrupt+0x314/0x770 kernel/time/hrtimer.c:1509
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1035 [inline]
smp_apic_timer_interrupt+0x18d/0x760 arch/x86/kernel/apic/apic.c:1060
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807
</IRQ>
Modules linked in:

======================================================
WARNING: possible circular locking dependency detected
4.20.0+ #6 Not tainted
------------------------------------------------------
syz-executor4/7885 is trying to acquire lock:
00000000c6e56e60 ((console_sem).lock){-.-.}, at: down_trylock+0x13/0x70
kernel/locking/semaphore.c:136

but task is already holding lock:
000000005fe7c7d0 (hrtimer_bases.lock){-.-.}, at:
lock_hrtimer_base.isra.0+0x75/0x130 kernel/time/hrtimer.c:165

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #4 (hrtimer_bases.lock){-.-.}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152
lock_hrtimer_base.isra.0+0x75/0x130 kernel/time/hrtimer.c:165
hrtimer_start_range_ns+0x120/0xda0 kernel/time/hrtimer.c:1104
hrtimer_start_expires include/linux/hrtimer.h:409 [inline]
start_rt_bandwidth kernel/sched/rt.c:70 [inline]
inc_rt_group kernel/sched/rt.c:1147 [inline]
inc_rt_tasks kernel/sched/rt.c:1191 [inline]
__enqueue_rt_entity kernel/sched/rt.c:1261 [inline]
enqueue_rt_entity kernel/sched/rt.c:1305 [inline]
enqueue_task_rt+0x95b/0x1010 kernel/sched/rt.c:1335
enqueue_task+0xb9/0x380 kernel/sched/core.c:730
__sched_setscheduler+0xe32/0x1fe0 kernel/sched/core.c:4336
_sched_setscheduler+0x218/0x340 kernel/sched/core.c:4373
sched_setscheduler+0xe/0x10 kernel/sched/core.c:4388
watchdog_dev_init+0x109/0x1db drivers/watchdog/watchdog_dev.c:1144
watchdog_init+0x81/0x294 drivers/watchdog/watchdog_core.c:355
do_one_initcall+0x129/0x937 init/main.c:889
do_initcall_level init/main.c:957 [inline]
do_initcalls init/main.c:965 [inline]
do_basic_setup init/main.c:983 [inline]
kernel_init_freeable+0x4db/0x5ca init/main.c:1136
kernel_init+0x12/0x1c5 init/main.c:1056
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352

-> #3 (&rt_b->rt_runtime_lock){-.-.}:
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144
__enable_runtime kernel/sched/rt.c:786 [inline]
rq_online_rt+0xb4/0x390 kernel/sched/rt.c:2178
set_rq_online.part.0+0xe7/0x140 kernel/sched/core.c:5666
set_rq_online kernel/sched/core.c:5772 [inline]
sched_cpu_activate+0x29e/0x430 kernel/sched/core.c:5765
cpuhp_invoke_callback+0x2f6/0x2110 kernel/cpu.c:168
cpuhp_thread_fun+0x496/0x8a0 kernel/cpu.c:685
smpboot_thread_fn+0x6ab/0xa10 kernel/smpboot.c:164
kthread+0x357/0x430 kernel/kthread.c:246
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352

-> #2 (&rq->lock){-.-.}:
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144
rq_lock kernel/sched/sched.h:1149 [inline]
task_fork_fair+0xb5/0x7a0 kernel/sched/fair.c:10058
sched_fork+0x437/0xb90 kernel/sched/core.c:2359
copy_process+0x1ff6/0x8730 kernel/fork.c:1893
_do_fork+0x1a9/0x1170 kernel/fork.c:2222
kernel_thread+0x34/0x40 kernel/fork.c:2281
rest_init+0x28/0x37b init/main.c:409
arch_call_rest_init+0xe/0x1b
start_kernel+0x882/0x8bd init/main.c:741
x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:470
x86_64_start_kernel+0x77/0x7b arch/x86/kernel/head64.c:451
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243

-> #1 (&p->pi_lock){-.-.}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152
try_to_wake_up+0xb9/0x1480 kernel/sched/core.c:1965
wake_up_process+0x10/0x20 kernel/sched/core.c:2129
__up.isra.0+0x1c0/0x2a0 kernel/locking/semaphore.c:262
up+0x13e/0x1c0 kernel/locking/semaphore.c:187
__up_console_sem+0xb7/0x1c0 kernel/printk/printk.c:236
console_unlock+0x778/0x11e0 kernel/printk/printk.c:2426
vprintk_emit+0x370/0x960 kernel/printk/printk.c:1931
vprintk_default+0x28/0x30 kernel/printk/printk.c:1958
vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398
printk+0xba/0xed kernel/printk/printk.c:1991
kobject_uevent_env+0x96/0x102b lib/kobject_uevent.c:469
call_crda net/wireless/reg.c:556 [inline]
reg_query_database+0x27b/0x400 net/wireless/reg.c:1104
reg_process_hint_core net/wireless/reg.c:2339 [inline]
reg_process_hint+0x1b3/0xf50 net/wireless/reg.c:2677
reg_process_pending_hints net/wireless/reg.c:2767 [inline]
reg_todo+0x468/0xc00 net/wireless/reg.c:2844
process_one_work+0xd0c/0x1ce0 kernel/workqueue.c:2153
worker_thread+0x143/0x14a0 kernel/workqueue.c:2296
kthread+0x357/0x430 kernel/kthread.c:246
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352

-> #0 ((console_sem).lock){-.-.}:
lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152
down_trylock+0x13/0x70 kernel/locking/semaphore.c:136
__down_trylock_console_sem+0xa8/0x210 kernel/printk/printk.c:219
console_trylock+0x15/0xa0 kernel/printk/printk.c:2242
console_trylock_spinning kernel/printk/printk.c:1662 [inline]
vprintk_emit+0x351/0x960 kernel/printk/printk.c:1930
vprintk_default+0x28/0x30 kernel/printk/printk.c:1958
vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398
printk+0xba/0xed kernel/printk/printk.c:1991
kasan_die_handler arch/x86/mm/kasan_init_64.c:252 [inline]
kasan_die_handler.cold+0x11/0x23 arch/x86/mm/kasan_init_64.c:247
notifier_call_chain+0x179/0x380 kernel/notifier.c:93
__atomic_notifier_call_chain kernel/notifier.c:183 [inline]
atomic_notifier_call_chain+0x96/0x190 kernel/notifier.c:193
notify_die+0x1b2/0x270 kernel/notifier.c:549
do_general_protection+0x13d/0x300 arch/x86/kernel/traps.c:557
general_protection+0x1e/0x30 arch/x86/entry/entry_64.S:1142
timerqueue_add+0xf2/0x320 lib/timerqueue.c:52
enqueue_hrtimer+0x1ae/0x570 kernel/time/hrtimer.c:951
__hrtimer_start_range_ns kernel/time/hrtimer.c:1080 [inline]
hrtimer_start_range_ns+0x62a/0xda0 kernel/time/hrtimer.c:1106
hrtimer_start_expires include/linux/hrtimer.h:409 [inline]
do_nanosleep+0x1a2/0x750 kernel/time/hrtimer.c:1676
hrtimer_nanosleep+0x2e4/0x640 kernel/time/hrtimer.c:1733
__do_sys_nanosleep kernel/time/hrtimer.c:1767 [inline]
__se_sys_nanosleep kernel/time/hrtimer.c:1754 [inline]
__x64_sys_nanosleep+0x1e0/0x280 kernel/time/hrtimer.c:1754
do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe

other info that might help us debug this:

Chain exists of:
(console_sem).lock --> &rt_b->rt_runtime_lock --> hrtimer_bases.lock

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(hrtimer_bases.lock);
lock(&rt_b->rt_runtime_lock);
lock(hrtimer_bases.lock);
lock((console_sem).lock);

*** DEADLOCK ***

2 locks held by syz-executor4/7885:
#0: 000000005fe7c7d0 (hrtimer_bases.lock){-.-.}, at:
lock_hrtimer_base.isra.0+0x75/0x130 kernel/time/hrtimer.c:165
#1: 0000000042835947 (rcu_read_lock){....}, at:
atomic_notifier_call_chain+0x0/0x190 kernel/notifier.c:329

stack backtrace:
CPU: 0 PID: 7885 Comm: syz-executor4 Not tainted 4.20.0+ #6
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+0x1db/0x2d0 lib/dump_stack.c:113
print_circular_bug.isra.0.cold+0x1cc/0x28f kernel/locking/lockdep.c:1224
check_prev_add kernel/locking/lockdep.c:1866 [inline]
check_prevs_add kernel/locking/lockdep.c:1979 [inline]
validate_chain kernel/locking/lockdep.c:2350 [inline]
__lock_acquire+0x3014/0x4a30 kernel/locking/lockdep.c:3338
lock_acquire+0x1db/0x570 kernel/locking/lockdep.c:3841
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152
down_trylock+0x13/0x70 kernel/locking/semaphore.c:136
__down_trylock_console_sem+0xa8/0x210 kernel/printk/printk.c:219
console_trylock+0x15/0xa0 kernel/printk/printk.c:2242
console_trylock_spinning kernel/printk/printk.c:1662 [inline]
vprintk_emit+0x351/0x960 kernel/printk/printk.c:1930
vprintk_default+0x28/0x30 kernel/printk/printk.c:1958
vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398
printk+0xba/0xed kernel/printk/printk.c:1991
kasan_die_handler arch/x86/mm/kasan_init_64.c:252 [inline]
kasan_die_handler.cold+0x11/0x23 arch/x86/mm/kasan_init_64.c:247
notifier_call_chain+0x179/0x380 kernel/notifier.c:93
__atomic_notifier_call_chain kernel/notifier.c:183 [inline]
atomic_notifier_call_chain+0x96/0x190 kernel/notifier.c:193
notify_die+0x1b2/0x270 kernel/notifier.c:549
do_general_protection+0x13d/0x300 arch/x86/kernel/traps.c:557
general_protection+0x1e/0x30 arch/x86/entry/entry_64.S:1142
RIP: 0010:timerqueue_add+0xf2/0x320 lib/timerqueue.c:52
Code: 48 c1 ea 03 42 80 3c 2a 00 0f 85 bc 01 00 00 49 8b 17 48 85 d2 74 3d
48 89 d3 e8 c9 62 93 f9 48 8d 7b 18 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00
0f 85 a3 01 00 00 4c 8b 7b 18 4c 89 f7 4c 89 fe e8
RSP: 0018:ffff88808aa6f968 EFLAGS: 00010003
RAX: 000000000000018a RBX: 0000000000000c3e RCX: ffffffff87ee2e9c
RDX: 0000000000000000 RSI: ffffffff87ee2e77 RDI: 0000000000000c56
RBP: ffff88808aa6f998 R08: ffff888091e6a3c0 R09: ffffed1015cc5b90
R10: ffffed1015cc5b8f R11: ffff8880ae62dc7b R12: ffff88808aa6fd10
R13: dffffc0000000000 R14: 000001375c7cd5e2 R15: ffff8880a940f468
enqueue_hrtimer+0x1ae/0x570 kernel/time/hrtimer.c:951
__hrtimer_start_range_ns kernel/time/hrtimer.c:1080 [inline]
hrtimer_start_range_ns+0x62a/0xda0 kernel/time/hrtimer.c:1106
hrtimer_start_expires include/linux/hrtimer.h:409 [inline]
do_nanosleep+0x1a2/0x750 kernel/time/hrtimer.c:1676
hrtimer_nanosleep+0x2e4/0x640 kernel/time/hrtimer.c:1733
__do_sys_nanosleep kernel/time/hrtimer.c:1767 [inline]
__se_sys_nanosleep kernel/time/hrtimer.c:1754 [inline]
__x64_sys_nanosleep+0x1e0/0x280 kernel/time/hrtimer.c:1754
do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x485540
Code: 00 00 48 c7 c0 d4 ff ff ff 64 c7 00 16 00 00 00 31 c0 eb be 66 0f 1f
44 00 00 83 3d 11 12 5d 00 00 75 14 b8 23 00 00 00 0f 05 <48> 3d 01 f0 ff
ff 0f 83 c4 e0 f8 ff c3 48 83 ec 08 e8 3a 55 fd ff
RSP: 002b:00007ffd8486d468 EFLAGS: 00000246 ORIG_RAX: 0000000000000023
RAX: ffffffffffffffda RBX: 000000
Lost 4 message(s)!
---[ end trace e77198ef7bc1fb1a ]---
general protection fault: 0000 [#2] PREEMPT SMP KASAN
CPU: 0 PID: 7885 Comm: syz-executor4 Tainted: G D 4.20.0+ #6
RIP: 0010:__read_once_size include/linux/compiler.h:191 [inline]
RIP: 0010:get_running_cputimer include/linux/sched/cputime.h:85 [inline]
RIP: 0010:account_group_system_time include/linux/sched/cputime.h:149
[inline]
RIP: 0010:account_system_index_time+0xe8/0x5f0 kernel/sched/cputime.c:168
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:timerqueue_add+0xf2/0x320 lib/timerqueue.c:52
Code: 04 00 00 49 8b 84 24 00 07 00 00 48 ba 00 00 00 00 00 fc ff df 48 8d
b8 40 01 00 00 48 8d 88 28 01 00 00 48 89 fe 48 c1 ee 03 <0f> b6 14 16 48
89 fe 83 e6 07 40 38 f2 7f 08 84 d2 0f 85 93 03 00
Code: 48 c1 ea 03 42 80 3c 2a 00 0f 85 bc 01 00 00 49 8b 17 48 85 d2 74 3d
48 89 d3 e8 c9 62 93 f9 48 8d 7b 18 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00
0f 85 a3 01 00 00 4c 8b 7b 18 4c 89 f7 4c 89 fe e8
RSP: 0018:ffff8880ae707a80 EFLAGS: 00010006
RSP: 0018:ffff88808aa6f968 EFLAGS: 00010003
RAX: 0000000000000000 RBX: 1ffff11015ce0f54 RCX: 0000000000000128
RAX: 000000000000018a RBX: 0000000000000c3e RCX: ffffffff87ee2e9c
RDX: dffffc0000000000 RSI: 0000000000000028 RDI: 0000000000000140
RDX: 0000000000000000 RSI: ffffffff87ee2e77 RDI: 0000000000000c56
RBP: ffff8880ae707b48 R08: ffff8880ae71f5f0 R09: ffffffff8a99f05d
RBP: ffff88808aa6f998 R08: ffff888091e6a3c0 R09: ffffed1015cc5b90
R10: ffffffff8a99f050 R11: 0000000000000001 R12: ffff8880a94a6440
R10: ffffed1015cc5b8f R11: ffff8880ae62dc7b R12: ffff88808aa6fd10
R13: 00000000009356d0 R14: 0000000000000003 R15: ffff8880ae707b20
FS: 0000000000000000(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
R13: dffffc0000000000 R14: 000001375c7cd5e2 R15: ffff8880a940f468
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
FS: 000000000274b940(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000
CR2: 0000000000000068 CR3: 0000000097294000 CR4: 00000000001406e0

Dmitry Vyukov

unread,
Jan 4, 2019, 6:13:52 AM1/4/19
to syzbot, 'Dmitry Vyukov' via syzkaller-upstream-moderation, Stefano Brivio
On Thu, Jan 3, 2019 at 8:04 AM syzbot
<syzbot+137ed3...@syzkaller.appspotmail.com> wrote:
>
> syzbot has found a reproducer for the following crash on:
>
> HEAD commit: 85f78456f286 Merge tag '9p-for-4.21' of git://github.com/m..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=13d8c5e7400000
> kernel config: https://syzkaller.appspot.com/x/.config?x=17c50660d3a88302
> dashboard link: https://syzkaller.appspot.com/bug?extid=137ed32ec9a6d5b0d5fe
> compiler: gcc (GCC) 9.0.0 20181231 (experimental)
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=163fe5e7400000
> CC: [fwei...@gmail.com linux-...@vger.kernel.org
> mi...@kernel.org tg...@linutronix.de]
>
> IMPORTANT: if you fix the bug, please add the following tag to the commit:
> Reported-by: syzbot+137ed3...@syzkaller.appspotmail.com

Random manifestation of the stack overflow/corruption:

#syz dup: kernel panic: stack is corrupted in udp4_lib_lookup2

See https://groups.google.com/forum/#!msg/syzkaller-bugs/vr87kmG5qRI/31nOcuVsFgAJ
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-upstream-m...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-upstream-moderation/0000000000000fcdc5057e885eab%40google.com.
> For more options, visit https://groups.google.com/d/optout.

syzbot

unread,
Jan 4, 2019, 10:22:03 AM1/4/19
to sbr...@redhat.com, syzkaller-upst...@googlegroups.com
Hello,

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

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

Tested on:

commit: 85f78456f286 Merge tag '9p-for-4.21' of git://github.com/m..
git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel config: https://syzkaller.appspot.com/x/.config?x=17c50660d3a88302
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
patch: https://syzkaller.appspot.com/x/patch.diff?x=14f2a3e7400000

Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages