syzbot


linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows

Status: auto-closed as invalid on 2022/06/20 14:22
Reported-by: syzbot+755d763a1d9f7bdb1729@syzkaller.appspotmail.com
First crash: 200d, last: 198d

Sample crash report:
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:71 [inline]
BUG: KASAN: null-ptr-deref in atomic_long_read include/linux/atomic/atomic-instrumented.h:1265 [inline]
BUG: KASAN: null-ptr-deref in get_mm_counter include/linux/mm.h:2039 [inline]
BUG: KASAN: null-ptr-deref in get_mm_rss include/linux/mm.h:2092 [inline]
BUG: KASAN: null-ptr-deref in task_nr_scan_windows.isra.0+0x23/0x120 kernel/sched/fair.c:1123
Read of size 8 at addr 0000000000000420 by task swapper/0/1

CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc6-next-20220511-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 print_report mm/kasan/report.c:432 [inline]
 kasan_report.cold+0x61/0x1c6 mm/kasan/report.c:491
 check_region_inline mm/kasan/generic.c:183 [inline]
 kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189
 instrument_atomic_read include/linux/instrumented.h:71 [inline]
 atomic_long_read include/linux/atomic/atomic-instrumented.h:1265 [inline]
 get_mm_counter include/linux/mm.h:2039 [inline]
 get_mm_rss include/linux/mm.h:2092 [inline]
 task_nr_scan_windows.isra.0+0x23/0x120 kernel/sched/fair.c:1123
 task_scan_min kernel/sched/fair.c:1144 [inline]
 task_scan_start+0x6c/0x400 kernel/sched/fair.c:1150
 task_tick_numa kernel/sched/fair.c:2948 [inline]
 task_tick_fair+0xaeb/0xef0 kernel/sched/fair.c:11190
 scheduler_tick+0x20a/0x5e0 kernel/sched/core.c:5387
 update_process_times+0x191/0x200 kernel/time/timer.c:1816
 tick_sched_handle+0x9b/0x180 kernel/time/tick-sched.c:243
 tick_sched_timer+0xee/0x120 kernel/time/tick-sched.c:1481
 __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
 __hrtimer_run_queues+0x1c0/0xe50 kernel/time/hrtimer.c:1749
 hrtimer_interrupt+0x31c/0x790 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline]
 __sysvec_apic_timer_interrupt+0x146/0x530 arch/x86/kernel/apic/apic.c:1112
 sysvec_apic_timer_interrupt+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1106
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:30 [inline]
RIP: 0010:__orc_find+0x83/0xf0 arch/x86/kernel/unwind_orc.c:52
Code: 01 d0 48 d1 f8 48 8d 5c 85 00 48 89 d8 48 c1 e8 03 42 0f b6 14 38 48 89 d8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 48 48 63 03 <48> 01 d8 48 39 c1 73 b0 4c 8d 63 fc 49 39 ec 73 b3 4d 29 ee 49 c1
RSP: 0000:ffffc90000067790 EFLAGS: 00000246
RAX: fffffffff54abca0 RBX: ffffffff8de19a3c RCX: ffffffff832c57a7
RDX: 0000000000000000 RSI: ffffffff8e5e2430 RDI: ffffffff8de19a3c
RBP: ffffffff8de19a3c R08: ffffffff8bbfe7e0 R09: ffffc9000006787c
R10: fffff5200000cf14 R11: 000000000008a07a R12: ffffffff8de19a3c
R13: ffffffff8de19a3c R14: ffffffff8de19a3c R15: dffffc0000000000
 orc_find arch/x86/kernel/unwind_orc.c:173 [inline]
 unwind_next_frame+0x2a3/0x1cc0 arch/x86/kernel/unwind_orc.c:443
 arch_stack_walk+0x7d/0xe0 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x8c/0xc0 kernel/stacktrace.c:122
 kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:436 [inline]
 __kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:469
 kasan_slab_alloc include/linux/kasan.h:224 [inline]
 slab_post_alloc_hook mm/slab.h:750 [inline]
 slab_alloc_node mm/slub.c:3214 [inline]
 slab_alloc mm/slub.c:3222 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3229 [inline]
 kmem_cache_alloc_lru+0x255/0x720 mm/slub.c:3246
 alloc_inode_sb include/linux/fs.h:2962 [inline]
 alloc_inode+0x168/0x230 fs/inode.c:262
 new_inode_pseudo fs/inode.c:1019 [inline]
 new_inode+0x27/0x270 fs/inode.c:1047
 tracefs_get_inode+0x1a/0x130 fs/tracefs/inode.c:132
 tracefs_create_file+0xe8/0x600 fs/tracefs/inode.c:483
 trace_create_file+0x2f/0x50 kernel/trace/trace.c:8824
 event_create_dir+0x504/0x1320 kernel/trace/trace_events.c:2460
 __trace_early_add_event_dirs+0x7e/0xf0 kernel/trace/trace_events.c:3478
 early_event_add_tracer kernel/trace/trace_events.c:3645 [inline]
 event_trace_init+0x9e/0x113 kernel/trace/trace_events.c:3805
 tracer_init_tracefs+0xf9/0x457 kernel/trace/trace.c:9722
 do_one_initcall+0x103/0x650 init/main.c:1303
 do_initcall_level init/main.c:1378 [inline]
 do_initcalls init/main.c:1394 [inline]
 do_basic_setup init/main.c:1413 [inline]
 kernel_init_freeable+0x6b1/0x73a init/main.c:1620
 kernel_init+0x1a/0x1d0 init/main.c:1509
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:297
 </TASK>
==================================================================
----------------
Code disassembly (best guess):
   0:	01 d0                	add    %edx,%eax
   2:	48 d1 f8             	sar    %rax
   5:	48 8d 5c 85 00       	lea    0x0(%rbp,%rax,4),%rbx
   a:	48 89 d8             	mov    %rbx,%rax
   d:	48 c1 e8 03          	shr    $0x3,%rax
  11:	42 0f b6 14 38       	movzbl (%rax,%r15,1),%edx
  16:	48 89 d8             	mov    %rbx,%rax
  19:	83 e0 07             	and    $0x7,%eax
  1c:	83 c0 03             	add    $0x3,%eax
  1f:	38 d0                	cmp    %dl,%al
  21:	7c 04                	jl     0x27
  23:	84 d2                	test   %dl,%dl
  25:	75 48                	jne    0x6f
  27:	48 63 03             	movslq (%rbx),%rax
* 2a:	48 01 d8             	add    %rbx,%rax <-- trapping instruction
  2d:	48 39 c1             	cmp    %rax,%rcx
  30:	73 b0                	jae    0xffffffe2
  32:	4c 8d 63 fc          	lea    -0x4(%rbx),%r12
  36:	49 39 ec             	cmp    %rbp,%r12
  39:	73 b3                	jae    0xffffffee
  3b:	4d 29 ee             	sub    %r13,%r14
  3e:	49                   	rex.WB
  3f:	c1                   	.byte 0xc1

Crashes (16):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-linux-next-kasan-gce-root 2022/05/11 14:21 linux-next 6107040c99d5 beb0b407 .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/11 14:21 linux-next 6107040c99d5 beb0b407 .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/11 14:21 linux-next 6107040c99d5 beb0b407 .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/11 10:57 linux-next 6107040c99d5 8d7b3b67 .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/11 10:57 linux-next 6107040c99d5 8d7b3b67 .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/10 23:44 linux-next 3bf222d317a2 8d7b3b67 .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/10 23:44 linux-next 3bf222d317a2 8d7b3b67 .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/10 23:44 linux-next 3bf222d317a2 8d7b3b67 .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/10 13:41 linux-next 3bf222d317a2 8b277b8e .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/10 13:41 linux-next 3bf222d317a2 8b277b8e .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/10 13:41 linux-next 3bf222d317a2 8b277b8e .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/10 11:20 linux-next ab38272e9973 8b277b8e .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/10 11:20 linux-next ab38272e9973 8b277b8e .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/09 12:09 linux-next ab38272e9973 8b277b8e .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/09 12:09 linux-next ab38272e9973 8b277b8e .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
ci-upstream-linux-next-kasan-gce-root 2022/05/09 12:09 linux-next ab38272e9973 8b277b8e .config log report linux-next boot error: KASAN: null-ptr-deref Read in task_nr_scan_windows
* Struck through repros no longer work on HEAD.