syzbot


KASAN: out-of-bounds Write in stack_trace_consume_entry

Status: closed as invalid on 2023/04/20 09:38
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+41eb4c478f352f548951@syzkaller.appspotmail.com
First crash: 378d, last: 378d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in stack_trace_consume_entry net C 706 630d 626d 0/26 auto-obsoleted due to no activity on 2022/12/04 06:07

Sample crash report:
==================================================================
BUG: KASAN: out-of-bounds in stack_trace_consume_entry+0x141/0x160 kernel/stacktrace.c:93
Write of size 8 at addr ffffc90002f7f910 by task kworker/0:1/15335

CPU: 0 PID: 15335 Comm: kworker/0:1 Not tainted 6.3.0-rc6-syzkaller-00173-g7a934f4bd7d6 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
Workqueue: events nsim_dev_trap_report_work
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106
 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319
 print_report mm/kasan/report.c:430 [inline]
 kasan_report+0x11c/0x130 mm/kasan/report.c:536
 stack_trace_consume_entry+0x141/0x160 kernel/stacktrace.c:93
 arch_stack_walk+0x71/0xf0 arch/x86/kernel/stacktrace.c:27
 stack_trace_save+0x90/0xc0 kernel/stacktrace.c:122
 kasan_save_stack+0x22/0x40 mm/kasan/common.c:45
 __kasan_record_aux_stack+0x7b/0x90 mm/kasan/generic.c:491
 insert_work+0x48/0x350 kernel/workqueue.c:1361
 __queue_work+0x625/0x1120 kernel/workqueue.c:1524
 __queue_delayed_work+0x1c8/0x270 kernel/workqueue.c:1672
 queue_delayed_work_on+0x109/0x120 kernel/workqueue.c:1708
 queue_delayed_work include/linux/workqueue.h:519 [inline]
 schedule_delayed_work include/linux/workqueue.h:671 [inline]
 nsim_dev_trap_report_work+0x9d1/0xc80 drivers/net/netdevsim/dev.c:845
 process_one_work+0x991/0x15c0 kernel/workqueue.c:2390
 worker_thread+0x669/0x1090 kernel/workqueue.c:2537
 kthread+0x2e8/0x3a0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>

The buggy address belongs to stack of task kworker/0:1/15335
 and is located at offset 176 in frame:
 stack_trace_save+0x0/0xc0 kernel/stacktrace.c:395

This frame has 1 object:
 [32, 56) 'c'

The buggy address belongs to the virtual mapping at
 [ffffc90002f78000, ffffc90002f81000) created by:
 kernel_clone+0xeb/0x890 kernel/fork.c:2682

The buggy address belongs to the physical page:
page:ffffea0001bd22c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6f48b
flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff)
raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 4593, tgid 4593 (udevd), ts 268694820916, free_ts 0
 prep_new_page mm/page_alloc.c:2553 [inline]
 get_page_from_freelist+0x1190/0x2e20 mm/page_alloc.c:4326
 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:5592
 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283
 vm_area_alloc_pages mm/vmalloc.c:2953 [inline]
 __vmalloc_area_node mm/vmalloc.c:3029 [inline]
 __vmalloc_node_range+0xb1c/0x14a0 mm/vmalloc.c:3201
 alloc_thread_stack_node kernel/fork.c:311 [inline]
 dup_task_struct kernel/fork.c:982 [inline]
 copy_process+0x1320/0x7590 kernel/fork.c:2098
 kernel_clone+0xeb/0x890 kernel/fork.c:2682
 __do_sys_clone+0xba/0x100 kernel/fork.c:2823
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
page_owner free stack trace missing

Memory state around the buggy address:
 ffffc90002f7f800: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
 ffffc90002f7f880: 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00
>ffffc90002f7f900: 00 00 04 00 72 00 00 00 00 00 00 00 00 00 00 00
                         ^
 ffffc90002f7f980: 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc90002f7fa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/15 20:14 upstream 7a934f4bd7d6 ec410564 .config console log report info ci-qemu-upstream KASAN: out-of-bounds Write in stack_trace_consume_entry
* Struck through repros no longer work on HEAD.