syzbot


KASAN: stack-out-of-bounds Read in __show_regs

Status: premoderation: reported on 2024/08/24 17:21
Reported-by: syzbot+fd5fc42955b673810426@syzkaller.appspotmail.com
First crash: 45d, last: 45d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: stack-out-of-bounds Read in __show_regs (2) kernel C error 2412 20h57m 115d 0/28 upstream: reported C repro on 2024/06/15 07:06
android-5-15 KASAN: stack-out-of-bounds Read in __show_regs 1 461d 461d 0/2 auto-obsoleted due to no activity on 2023/10/03 16:34
upstream KASAN: stack-out-of-bounds Read in __show_regs kernel C unreliable unreliable 517 706d 1209d 0/28 auto-obsoleted due to no activity on 2023/05/14 10:00
upstream BUG: unable to handle kernel NULL pointer dereference in exc_page_fault kernel 5 41d 49d 0/28 closed as invalid on 2024/09/13 11:13

Sample crash report:
Code: 93 35 87 1b 31 c3 c1 c3 0d 8d 84 9b 64 6b 54 e6 89 c1 c1 e9 10 31 c1 69 c1 6b ca eb 85 89 c1 c1 e9 0d 31 c1 69 c1 35 ae b2 c2 <89> c1 c1 e9 10 31 c1 48 63 d9 48 21 d3 4c 89 f0 48 c1 e8 03 80 3c
RSP: 3ee2ae4a:0008000000bd7190 EFLAGS: ffff8881f7157254 ORIG_RAX: ffffc90000bd7210
RAX: ffff8881f7157254 RBX: 2de6222b7a3cbc00 RCX: ffffffff86798700
RDX: 1ffffffff0cf30e0 RSI: dffffc0000000000 RDI: ffff88823ff52b40
==================================================================
BUG: KASAN: stack-out-of-bounds in __show_regs+0x151/0x540 arch/x86/kernel/process_64.c:85
Read of size 8 at addr ffffc90000bd70b8 by task syz.2.3754/16845

CPU: 0 PID: 16845 Comm: syz.2.3754 Tainted: G        W         5.10.223-syzkaller-01561-g0890c03b8b7d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118
 print_address_description+0x81/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:435 [inline]
 kasan_report+0x179/0x1c0 mm/kasan/report.c:452
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309
 __show_regs+0x151/0x540 arch/x86/kernel/process_64.c:85
 show_regs_if_on_stack+0xd9/0xe0 arch/x86/kernel/dumpstack.c:173
 show_trace_log_lvl+0x2a7/0x380 arch/x86/kernel/dumpstack.c:301
 show_stack+0x37/0x40 arch/x86/kernel/dumpstack.c:321
 sched_show_task+0x35b/0x540 kernel/sched/core.c:6747
 rcu_print_detail_task_stall_rnp kernel/rcu/tree_stall.h:224 [inline]
 print_other_cpu_stall+0xf4c/0x12f0 kernel/rcu/tree_stall.h:518
 check_cpu_stall kernel/rcu/tree_stall.h:676 [inline]
 rcu_pending kernel/rcu/tree.c:3783 [inline]
 rcu_sched_clock_irq+0x9f4/0x1890 kernel/rcu/tree.c:2590
 update_process_times+0x198/0x200 kernel/time/timer.c:1748
 tick_sched_handle kernel/time/tick-sched.c:225 [inline]
 tick_sched_timer+0x188/0x240 kernel/time/tick-sched.c:1389
 __run_hrtimer kernel/time/hrtimer.c:1583 [inline]
 __hrtimer_run_queues+0x3d7/0xa50 kernel/time/hrtimer.c:1647
 hrtimer_interrupt+0x39a/0x8b0 kernel/time/hrtimer.c:1709
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1083 [inline]
 __sysvec_apic_timer_interrupt+0xfd/0x3c0 arch/x86/kernel/apic/apic.c:1100
 asm_call_irq_on_stack+0xf/0x20
 </IRQ>
 __run_sysvec_on_irqstack arch/x86/include/asm/irq_stack.h:37 [inline]
 run_sysvec_on_irqstack_cond arch/x86/include/asm/irq_stack.h:89 [inline]
 sysvec_apic_timer_interrupt+0x85/0xe0 arch/x86/kernel/apic/apic.c:1094
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:635
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x51/0x80 kernel/locking/spinlock.c:191
Code: 74 0c 48 c7 c7 f0 77 6c 86 e8 3b 08 f6 fc 48 83 3d 43 3e ba 01 00 74 37 48 89 df e8 6d 65 9e fc 66 90 4c 89 75 e8 ff 75 e8 9d <bf> 01 00 00 00 e8 85 d5 96 fc 65 8b 05 ba 33 50 7b 85 c0 74 09 48
RSP: 0018:ffffc90001b07bc8 EFLAGS: 00000246
RAX: 0000000000000001 RBX: ffff888114c4e900 RCX: dffffc0000000000
RDX: ffffc90008fa3000 RSI: 0000000000000246 RDI: ffff888114c4e900
RBP: ffffc90001b07be0 R08: ffffffff8141ce82 R09: ffffed1022f819e1
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff11022f81adc
R13: dffffc0000000000 R14: 0000000000000246 R15: 0000000000000000
 spin_unlock_irqrestore include/linux/spinlock.h:409 [inline]
 unlock_task_sighand include/linux/sched/signal.h:719 [inline]
 do_send_sig_info+0xfb/0x230 kernel/signal.c:1295
 group_send_sig_info+0x113/0x320 kernel/signal.c:1417
 bpf_send_signal_common+0x2d8/0x420 kernel/trace/bpf_trace.c:1106
 ____bpf_send_signal kernel/trace/bpf_trace.c:1111 [inline]
 bpf_send_signal+0x19/0x20 kernel/trace/bpf_trace.c:1109
 bpf_prog_7ba5217f62dcd359+0x38/0x4a0
 bpf_dispatcher_nop_func include/linux/bpf.h:669 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2061 [inline]
 bpf_trace_run2+0xef/0x280 kernel/trace/bpf_trace.c:2098
 __bpf_trace_sys_enter+0x62/0x70 include/trace/events/syscalls.h:18
 trace_sys_enter include/trace/events/syscalls.h:18 [inline]
 syscall_trace_enter kernel/entry/common.c:67 [inline]
 __syscall_enter_from_user_work kernel/entry/common.c:81 [inline]
 syscall_enter_from_user_mode+0x144/0x1a0 kernel/entry/common.c:99
 do_syscall_64+0x13/0x70 arch/x86/entry/common.c:41
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f8d98e95e79
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f8d97ad10e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 00007f8d99032138 RCX: 00007f8d98e95e79
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f8d99032138
RBP: 00007f8d99032130 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8d9903213c
R13: 0000000000000000 R14: 00007ffd272ef180 R15: 00007ffd272ef268


Memory state around the buggy address:
 ffffc90000bd6f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc90000bd7000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90000bd7080: f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00 00 00 00 00
                                        ^
 ffffc90000bd7100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc90000bd7180: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00
==================================================================
RBP: ffff88810b9b8690 R08: ffffffff86798700 R09: ffff88823ff52b48
R10: ffff88810b86d120 R11: ffff88810b9b8f7c R12: ffff88810b9b8688
R13: ffff88810b9b8f78 R14: 0000000000000046 R15: ffffc90000bd73e0
rcu: rcu_preempt kthread starved for 602 jiffies! g154373 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=0
rcu: 	Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt     state:I stack:    0 pid:   13 ppid:     2 flags:0x10004000
Call Trace:
 context_switch kernel/sched/core.c:4046 [inline]
 __schedule+0xbe6/0x1330 kernel/sched/core.c:4804
 schedule+0x13d/0x1d0 kernel/sched/core.c:4882
 schedule_timeout+0x18c/0x360 kernel/time/timer.c:1913
 rcu_gp_fqs_loop kernel/rcu/tree.c:1943 [inline]
 rcu_gp_kthread+0xefc/0x23a0 kernel/rcu/tree.c:2117
 kthread+0x34b/0x3d0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
----------------
Code disassembly (best guess):
   0:	93                   	xchg   %eax,%ebx
   1:	35 87 1b 31 c3       	xor    $0xc3311b87,%eax
   6:	c1 c3 0d             	rol    $0xd,%ebx
   9:	8d 84 9b 64 6b 54 e6 	lea    -0x19ab949c(%rbx,%rbx,4),%eax
  10:	89 c1                	mov    %eax,%ecx
  12:	c1 e9 10             	shr    $0x10,%ecx
  15:	31 c1                	xor    %eax,%ecx
  17:	69 c1 6b ca eb 85    	imul   $0x85ebca6b,%ecx,%eax
  1d:	89 c1                	mov    %eax,%ecx
  1f:	c1 e9 0d             	shr    $0xd,%ecx
  22:	31 c1                	xor    %eax,%ecx
  24:	69 c1 35 ae b2 c2    	imul   $0xc2b2ae35,%ecx,%eax
* 2a:	89 c1                	mov    %eax,%ecx <-- trapping instruction
  2c:	c1 e9 10             	shr    $0x10,%ecx
  2f:	31 c1                	xor    %eax,%ecx
  31:	48 63 d9             	movslq %ecx,%rbx
  34:	48 21 d3             	and    %rdx,%rbx
  37:	4c 89 f0             	mov    %r14,%rax
  3a:	48 c1 e8 03          	shr    $0x3,%rax
  3e:	80                   	.byte 0x80
  3f:	3c                   	.byte 0x3c

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/24 17:20 android13-5.10-lts 0890c03b8b7d d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: stack-out-of-bounds Read in __show_regs
* Struck through repros no longer work on HEAD.