Bug 208237

Summary: INFO: rcu detected stall in tty_write bug
Product: Drivers Reporter: tkeri (tkeri)
Component: Console/FramebuffersAssignee: James Simmons (jsimmons)
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 5.7.0+ Subsystem:
Regression: No Bisected commit-id:
Attachments: Linux config
Syzkaller reproducer
C reproducer

Description tkeri 2020-06-18 12:03:46 UTC
Created attachment 289739 [details]
Linux config

audit: type=1400 audit(1591452021.709:8): avc:  denied  { execmem } for  pid=388 comm="syz-executor772" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
rcu: INFO: rcu_sched self-detected stall on CPU
rcu: 	1-....: (10497 ticks this GP) idle=2f6/1/0x4000000000000002 softirq=2661/2661 fqs=5119 
	(t=21000 jiffies g=3217 q=17)
NMI backtrace for cpu 1
CPU: 1 PID: 394 Comm: syz-executor772 Not tainted 5.7.0+ #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
Call Trace:
 <IRQ>
 dump_stack+0xb4/0xfe lib/dump_stack.c:77
 nmi_cpu_backtrace.cold.7+0x19/0x7d lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x164/0x19b lib/nmi_backtrace.c:62
 rcu_dump_cpu_stacks+0xfb/0x140 include/linux/nmi.h:164
 rcu_sched_clock_irq.cold.88+0xa8/0x4c5 kernel/rcu/tree_stall.h:553
 update_process_times+0x24/0x70 kernel/time/timer.c:1727
 tick_sched_handle+0xb4/0xd0 kernel/time/tick-sched.c:176
 tick_sched_timer+0x3c/0xc0 kernel/time/tick-sched.c:1320
 __hrtimer_run_queues+0x260/0x5a0 kernel/time/hrtimer.c:1520
 hrtimer_interrupt+0x1e0/0x3f0 kernel/time/hrtimer.c:1646
 smp_apic_timer_interrupt+0x83/0x1d0 arch/x86/kernel/apic/apic.c:1080
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829
 </IRQ>
RIP: 0010:memcpy_erms+0x6/0x10 arch/x86/lib/memcpy_64.S:56
Code: ce fe ff ff eb 1e 0f 1f 00 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 <f3> a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe
RSP: 0018:ffffc900002b7900 EFLAGS: 00010202 ORIG_RAX: ffffffffffffff13
RAX: ffff8880000b8000 RBX: ffff88806cc30800 RCX: 0000000000006000
RDX: 0000000000007ff8 RSI: ffff8880000ba000 RDI: ffff8880000b9ff8
RBP: 0000000000000001 R08: ffffed1000017fff R09: ffffed1000017fff
R10: ffff8880000bfff7 R11: ffffed1000017ffe R12: 0000000000000008
R13: ffff88806cc309a8 R14: ffff8880000b8000 R15: ffff88806cc30980
 vgacon_scroll+0x599/0x5b0 include/linux/vt_buffer.h:49
 con_scroll+0x303/0x420 drivers/tty/vt/vt.c:637
 lf+0x19d/0x1b0 drivers/tty/vt/vt.c:1483
 do_con_write.part.25+0x10ad/0x1420 drivers/tty/vt/vt.c:2781
 con_write+0x3f/0xc0 drivers/tty/vt/vt.c:2593
 n_tty_write+0x836/0xa00 drivers/tty/n_tty.c:2356
 tty_write+0x33a/0x640 drivers/tty/tty_io.c:962
 __vfs_write+0x50/0xa0 fs/read_write.c:495
 vfs_write+0x169/0x350 fs/read_write.c:559
 ksys_write+0xe3/0x1d0 fs/read_write.c:612
 do_syscall_64+0x8a/0x2b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x44b789
Code: 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd07540b08 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000044b789
RDX: 0000000000001000 RSI: 0000000020001100 RDI: 0000000000000005
RBP: 00007ffd07540b14 R08: 000000000000000d R09: 0000000907540c68
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 000000000002ae5d R14: 00000000006bc018 R15: 0000000000000000
Comment 1 tkeri 2020-06-18 12:07:01 UTC
Created attachment 289741 [details]
Syzkaller reproducer
Comment 2 tkeri 2020-06-18 12:07:17 UTC
Created attachment 289743 [details]
C reproducer