syzbot


KASAN: stack-out-of-bounds Read in __show_regs (2)

Status: upstream: reported on 2024/06/15 07:06
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+e9be5674af5e3a0b9ecc@syzkaller.appspotmail.com
First crash: 7d05h, last: 1d02h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [kernel?] KASAN: stack-out-of-bounds Read in __show_regs (2) 0 (1) 2024/06/15 07:06
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 KASAN: stack-out-of-bounds Read in __show_regs 1 348d 348d 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 593d 1097d 0/27 auto-obsoleted due to no activity on 2023/05/14 10:00

Sample crash report:
RDX: 0000777d58baed01 RSI: ffffffff8bcace80 RDI: ffffffff8c200760
RBP: ffffc9000529f9b8 R08: ffffffff81423c05 R09: 1ffffffff1f5c095
==================================================================
BUG: KASAN: stack-out-of-bounds in __show_regs+0x1f3/0x610 arch/x86/kernel/process_64.c:89
Read of size 8 at addr ffffc9000529f858 by task kworker/u8:9/2816

CPU: 0 PID: 2816 Comm: kworker/u8:9 Not tainted 6.10.0-rc3-next-20240611-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Workqueue: bat_events batadv_nc_worker
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:91 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:117
 print_address_description mm/kasan/report.c:377 [inline]
 print_report+0x169/0x550 mm/kasan/report.c:488
 kasan_report+0x143/0x180 mm/kasan/report.c:601
 __show_regs+0x1f3/0x610 arch/x86/kernel/process_64.c:89
 show_trace_log_lvl+0x3d4/0x520 arch/x86/kernel/dumpstack.c:301
 sched_show_task+0x578/0x740 kernel/sched/core.c:7432
 report_rtnl_holders+0x1ba/0x2d0 net/core/rtnetlink.c:104
 call_timer_fn+0x18e/0x650 kernel/time/timer.c:1792
 expire_timers kernel/time/timer.c:1843 [inline]
 __run_timers kernel/time/timer.c:2417 [inline]
 __run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2428
 run_timer_base kernel/time/timer.c:2437 [inline]
 run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2447
 handle_softirqs+0x2c4/0x970 kernel/softirq.c:554
 __do_softirq kernel/softirq.c:588 [inline]
 invoke_softirq kernel/softirq.c:428 [inline]
 __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
 sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lockdep_enabled kernel/locking/lockdep.c:123 [inline]
RIP: 0010:lock_acquire+0x144/0x550 kernel/locking/lockdep.c:5793
Code: 8b 05 00 4d 93 7e 85 c0 0f 85 8f 01 00 00 65 48 8b 1c 25 00 d6 03 00 48 81 c3 dc 0a 00 00 48 89 d8 48 c1 e8 03 42 0f b6 04 28 <84> c0 0f 85 e5 02 00 00 83 3b 00 0f 85 62 01 00 00 4c 8d bc 24 80
RSP: 0018:ffffc90009ddf9e0 EFLAGS: 00000a03
RAX: 0000000000000000 RBX: ffff88802b640adc RCX: ffffffff816f3d34
RDX: 0000000000000000 RSI: ffffffff8c200740 RDI: ffffffff8c200700
RBP: ffffc90009ddfb40 R08: ffffffff8fae04af R09: 1ffffffff1f5c095
R10: dffffc0000000000 R11: fffffbfff1f5c096 R12: 1ffff920013bbf44
R13: dffffc0000000000 R14: 0000000000000000 R15: dffffc0000000000
 rcu_lock_acquire include/linux/rcupdate.h:326 [inline]
 rcu_read_lock include/linux/rcupdate.h:838 [inline]
 batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:408 [inline]
 batadv_nc_worker+0xec/0x610 net/batman-adv/network-coding.c:719
 process_one_work kernel/workqueue.c:3248 [inline]
 process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3329
 worker_thread+0x86d/0xd50 kernel/workqueue.c:3409
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:144
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

The buggy address belongs to the virtual mapping at
 [ffffc90005298000, ffffc900052a1000) created by:
 copy_process+0x5d1/0x3dc0 kernel/fork.c:2201

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888017fe4400 pfn:0x7e01d
memcg:ffff888028b6cb02
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: ffff888017fe4400 0000000000000000 00000001ffffffff ffff888028b6cb02
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 11022, tgid 11022 (syz-executor.3), ts 474489750830, free_ts 474386245793
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1470
 prep_new_page mm/page_alloc.c:1478 [inline]
 get_page_from_freelist+0x2cbd/0x2d70 mm/page_alloc.c:3457
 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4715
 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2263
 vm_area_alloc_pages mm/vmalloc.c:3567 [inline]
 __vmalloc_area_node mm/vmalloc.c:3643 [inline]
 __vmalloc_node_range_noprof+0x971/0x1460 mm/vmalloc.c:3824
 alloc_thread_stack_node kernel/fork.c:310 [inline]
 dup_task_struct+0x444/0x8c0 kernel/fork.c:1110
 copy_process+0x5d1/0x3dc0 kernel/fork.c:2201
 kernel_clone+0x226/0x8f0 kernel/fork.c:2778
 __do_sys_clone3 kernel/fork.c:3079 [inline]
 __se_sys_clone3+0x2cb/0x350 kernel/fork.c:3063
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 1791 tgid 1791 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1089 [inline]
 free_unref_page+0xd22/0xea0 mm/page_alloc.c:2621
 vfree+0x186/0x2e0 mm/vmalloc.c:3347
 delayed_vfree_work+0x56/0x80 mm/vmalloc.c:3268
 process_one_work kernel/workqueue.c:3248 [inline]
 process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3329
 worker_thread+0x86d/0xd50 kernel/workqueue.c:3409
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:144
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

Memory state around the buggy address:
 ffffc9000529f700: f2 f2 00 00 00 00 00 00 f2 f2 f2 f2 00 00 00 00
 ffffc9000529f780: 00 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00
>ffffc9000529f800: 00 00 00 00 f1 f1 f1 f1 00 f2 f2 f2 00 f3 f3 f3
                                                    ^
 ffffc9000529f880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffc9000529f900: f1 f1 f1 f1 00 f2 f2 f2 00 f3 f3 f3 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
   0:	8b 05 00 4d 93 7e    	mov    0x7e934d00(%rip),%eax        # 0x7e934d06
   6:	85 c0                	test   %eax,%eax
   8:	0f 85 8f 01 00 00    	jne    0x19d
   e:	65 48 8b 1c 25 00 d6 	mov    %gs:0x3d600,%rbx
  15:	03 00
  17:	48 81 c3 dc 0a 00 00 	add    $0xadc,%rbx
  1e:	48 89 d8             	mov    %rbx,%rax
  21:	48 c1 e8 03          	shr    $0x3,%rax
  25:	42 0f b6 04 28       	movzbl (%rax,%r13,1),%eax
* 2a:	84 c0                	test   %al,%al <-- trapping instruction
  2c:	0f 85 e5 02 00 00    	jne    0x317
  32:	83 3b 00             	cmpl   $0x0,(%rbx)
  35:	0f 85 62 01 00 00    	jne    0x19d
  3b:	4c                   	rex.WR
  3c:	8d                   	.byte 0x8d
  3d:	bc                   	.byte 0xbc
  3e:	24 80                	and    $0x80,%al

Crashes (488):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/17 09:38 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/17 08:39 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/17 07:36 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/17 06:31 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/17 05:25 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/17 04:23 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/17 03:59 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/17 01:02 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/17 00:00 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 23:06 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 21:47 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 20:28 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 18:24 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 17:21 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 17:12 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 15:27 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 14:26 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 13:43 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 11:25 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 10:15 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 09:13 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 08:06 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 07:16 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 05:38 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 04:29 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 03:21 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 01:55 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 01:44 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/16 00:22 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 23:12 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 22:06 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 20:39 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 19:09 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 18:06 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 17:02 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 16:02 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 15:28 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 13:55 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 11:38 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 10:35 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 08:49 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 04:33 linux-next a957267fa7e9 8d849073 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/15 03:26 linux-next a957267fa7e9 8d849073 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/11 07:03 linux-next a957267fa7e9 048c640a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in __show_regs
2024/06/17 02:42 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: out-of-bounds Read in __show_regs
* Struck through repros no longer work on HEAD.