syzbot


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

Status: closed as dup on 2018/06/20 07:51
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+3ae3575e398ca1d88e5d@syzkaller.appspotmail.com
First crash: 2161d, last: 424d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
KASAN: use-after-free Read in do_general_protection kernel C error error 2 2156d 2185d
Discussions (1)
Title Replies (including bot) Last reply
KASAN: stack-out-of-bounds Read in unwind_next_frame 1 (2) 2018/06/20 07:50
Similar bugs (13)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: stack-out-of-bounds Read in unwind_next_frame C 1039 447d 1706d 0/1 upstream: reported C repro on 2019/09/18 00:47
android-54 KASAN: stack-out-of-bounds Read in unwind_next_frame C 49 1054d 1557d 0/2 auto-obsoleted due to no activity on 2023/04/20 07:24
android-49 KASAN: stack-out-of-bounds Read in unwind_next_frame 5 2113d 2348d 0/3 auto-closed as invalid on 2019/02/22 14:33
linux-4.19 KASAN: stack-out-of-bounds Read in unwind_next_frame C error 525 458d 1544d 0/1 upstream: reported C repro on 2020/02/26 18:51
android-414 KASAN: stack-out-of-bounds Read in unwind_next_frame C 2192 1628d 1866d 0/1 public: reported C repro on 2019/04/11 00:00
android-54 KASAN: out-of-bounds Read in unwind_next_frame 16 978d 1484d 0/2 auto-closed as invalid on 2022/01/13 05:16
linux-4.14 KASAN: out-of-bounds Read in unwind_next_frame C error 14 1362d 1697d 0/1 upstream: reported C repro on 2019/09/26 21:20
upstream KASAN: out-of-bounds Read in unwind_next_frame fs syz error error 12 1695d 1959d 0/26 auto-obsoleted due to no activity on 2022/09/07 09:08
linux-4.19 KASAN: out-of-bounds Read in unwind_next_frame 1 1642d 1642d 0/1 auto-closed as invalid on 2020/03/19 23:00
android-49 KASAN: out-of-bounds Read in unwind_next_frame C 14 2048d 1864d 0/3 public: reported C repro on 2019/04/13 00:00
linux-4.19 KASAN: out-of-bounds Read in unwind_next_frame (2) 1 1231d 1231d 0/1 auto-closed as invalid on 2021/05/04 22:57
android-414 KASAN: out-of-bounds Read in unwind_next_frame (2) C 5 1636d 1743d 0/1 public: reported C repro on 2019/08/11 14:38
android-414 KASAN: out-of-bounds Read in unwind_next_frame 1 2040d 1863d 0/1 auto-closed as invalid on 2019/04/28 00:03

Sample crash report:
==================================================================
BUG: KASAN: stack-out-of-bounds in user_mode arch/x86/include/asm/ptrace.h:136 [inline]
BUG: KASAN: stack-out-of-bounds in unwind_next_frame+0x17fc/0x1ef0 arch/x86/kernel/unwind_orc.c:455
Read of size 8 at addr ffffc90004b3fb88 by task syz-executor285/5383

CPU: 0 PID: 5383 Comm: syz-executor285 Not tainted 6.2.0-rc8-next-20230217-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
Call Trace:
 <IRQ>
 __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
 user_mode arch/x86/include/asm/ptrace.h:136 [inline]
 unwind_next_frame+0x17fc/0x1ef0 arch/x86/kernel/unwind_orc.c:455
 arch_stack_walk+0x81/0xf0 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x90/0xc0 kernel/stacktrace.c:122
 kasan_save_stack+0x22/0x40 mm/kasan/common.c:45
 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491
 irq_work_queue_on+0xd6/0x1a0 kernel/irq_work.c:140
 irq_work_single+0x1e4/0x260 kernel/irq_work.c:211
 __flush_smp_call_function_queue+0x484/0x7b0 kernel/smp.c:470
 __sysvec_call_function_single+0xce/0x4f0 arch/x86/kernel/smp.c:248
 sysvec_call_function_single+0x92/0xc0 arch/x86/kernel/smp.c:243
 </IRQ>
 <TASK>
 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:653
RIP: 0010:__unix_dgram_recvmsg+0x481/0xb90 net/unix/af_unix.c:2530
Code: 08 00 00 00 00 c7 40 14 00 00 00 00 48 8b 84 24 20 01 00 00 65 48 2b 04 25 28 00 00 00 0f 85 19 06 00 00 48 81 c4 28 01 00 00 <44> 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f c3 e8 3c 7d b6 f8 49 8d bc
RSP: 0018:ffffc90004b3f9a0 EFLAGS: 00000296
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88807ef357c0 RSI: ffffffff88ce15ce RDI: ffffc90004b3f7c0
RBP: ffff888022cb4640 R08: 0000000000000001 R09: ffffc90004b3f7c7
R10: fffff52000967ef8 R11: 0000000000000000 R12: ffff888022da5800
R13: 0000000000000000 R14: 0000000000000000 R15: ffffc90004b3f940
 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:653
RIP: 0046:___sys_recvmsg+0x0/0x180 net/socket.c:2755
RSP: 8164e53d:0000000000000001 EFLAGS: 00000000 ORIG_RAX: ffffffff8bfc3440
RAX: 0000000020398280 RBX: fd9bb9f0a96f6900 RCX: 000000000000e607
RDX: ffffffff880ca902 RSI: ffff8880771fbc00 RDI: 0000000041b58ab3
RBP: 0000000000000000 R08: ffffc90004b3fdb0 R09: 0000000000000002
R10: 0000000000000000 R11: 1ffff92000967f6e R12: ffffffff8a16019d
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

The buggy address belongs to stack of task syz-executor285/5383
 and is located at offset 24 in frame:
 ___sys_recvmsg+0x0/0x180 net/socket.c:2446

This frame has 3 objects:
 [32, 40) 'iov'
 [64, 72) 'uaddr'
 [96, 224) 'iovstack'

The buggy address belongs to the virtual mapping at
 [ffffc90004b38000, ffffc90004b41000) created by:
 kernel_clone+0xeb/0xa10 kernel/fork.c:2684

The buggy address belongs to the physical page:
page:ffffea00008837c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x220df
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 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 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 5359, tgid 5359 (syz-executor285), ts 478091991519, free_ts 478074210701
 prep_new_page mm/page_alloc.c:2552 [inline]
 get_page_from_freelist+0x11bb/0x2d50 mm/page_alloc.c:4339
 __alloc_pages+0x1cb/0x5c0 mm/page_alloc.c:5605
 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283
 vm_area_alloc_pages mm/vmalloc.c:2942 [inline]
 __vmalloc_area_node mm/vmalloc.c:3010 [inline]
 __vmalloc_node_range+0xb8a/0x1300 mm/vmalloc.c:3180
 alloc_thread_stack_node kernel/fork.c:311 [inline]
 dup_task_struct kernel/fork.c:984 [inline]
 copy_process+0x1320/0x76c0 kernel/fork.c:2100
 kernel_clone+0xeb/0xa10 kernel/fork.c:2684
 __do_sys_clone+0xba/0x100 kernel/fork.c:2825
 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 last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1453 [inline]
 free_pcp_prepare+0x4de/0x930 mm/page_alloc.c:1503
 free_unref_page_prepare mm/page_alloc.c:3401 [inline]
 free_unref_page+0x1d/0x490 mm/page_alloc.c:3496
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x195/0x220 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305
 kasan_slab_alloc include/linux/kasan.h:186 [inline]
 slab_post_alloc_hook mm/slab.h:769 [inline]
 slab_alloc_node mm/slub.c:3452 [inline]
 slab_alloc mm/slub.c:3460 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3467 [inline]
 kmem_cache_alloc+0x175/0x320 mm/slub.c:3476
 vm_area_alloc+0x20/0x100 kernel/fork.c:458
 mmap_region+0x403/0x2690 mm/mmap.c:2553
 do_mmap+0x831/0xf60 mm/mmap.c:1364
 vm_mmap_pgoff+0x1af/0x280 mm/util.c:542
 ksys_mmap_pgoff+0x7d/0x5a0 mm/mmap.c:1410
 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

Memory state around the buggy address:
 ffffc90004b3fa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f3 f3
 ffffc90004b3fb00: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
>ffffc90004b3fb80: f1 f1 00 f2 f2 f2 00 f2 f2 f2 00 00 00 00 00 00
                      ^
 ffffc90004b3fc00: 00 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3 00 00
 ffffc90004b3fc80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
   0:	08 00                	or     %al,(%rax)
   2:	00 00                	add    %al,(%rax)
   4:	00 c7                	add    %al,%bh
   6:	40 14 00             	adc    $0x0,%al
   9:	00 00                	add    %al,(%rax)
   b:	00 48 8b             	add    %cl,-0x75(%rax)
   e:	84 24 20             	test   %ah,(%rax,%riz,1)
  11:	01 00                	add    %eax,(%rax)
  13:	00 65 48             	add    %ah,0x48(%rbp)
  16:	2b 04 25 28 00 00 00 	sub    0x28,%eax
  1d:	0f 85 19 06 00 00    	jne    0x63c
  23:	48 81 c4 28 01 00 00 	add    $0x128,%rsp
* 2a:	44 89 e8             	mov    %r13d,%eax <-- trapping instruction
  2d:	5b                   	pop    %rbx
  2e:	5d                   	pop    %rbp
  2f:	41 5c                	pop    %r12
  31:	41 5d                	pop    %r13
  33:	41 5e                	pop    %r14
  35:	41 5f                	pop    %r15
  37:	c3                   	retq
  38:	e8 3c 7d b6 f8       	callq  0xf8b67d79
  3d:	49                   	rex.WB
  3e:	8d                   	.byte 0x8d
  3f:	bc                   	.byte 0xbc

Crashes (929):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/18 00:17 linux-next c068f40300a0 3e7039f4 .config console log report syz C ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2018/07/14 08:12 upstream 9d2e34897d8d 92a49505 .config console log report syz C ci-upstream-kasan-gce-root
2023/02/19 11:23 linux-next c068f40300a0 bcdf85f8 .config console log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/22 03:32 linux-next 465461cf4846 42a4d508 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/22 02:30 linux-next 465461cf4846 42a4d508 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/22 01:42 linux-next 465461cf4846 42a4d508 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/22 00:36 linux-next 465461cf4846 42a4d508 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/22 00:28 linux-next 465461cf4846 42a4d508 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 22:56 linux-next 465461cf4846 42a4d508 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 21:50 linux-next 465461cf4846 42a4d508 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 20:49 linux-next 465461cf4846 42a4d508 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 19:49 linux-next 465461cf4846 42a4d508 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 17:29 linux-next 465461cf4846 f949448d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 17:14 linux-next 465461cf4846 f949448d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 15:54 linux-next 465461cf4846 f949448d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 14:51 linux-next 465461cf4846 f949448d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 13:33 linux-next 465461cf4846 f949448d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 12:34 linux-next 465461cf4846 f949448d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 11:03 linux-next 465461cf4846 f949448d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 10:25 linux-next 465461cf4846 f949448d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 09:23 linux-next 465461cf4846 f949448d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 08:18 linux-next 465461cf4846 f949448d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 08:04 linux-next 465461cf4846 f949448d .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 06:52 linux-next 465461cf4846 4f5f5209 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/21 01:46 linux-next d2af0fa4bfa4 4f5f5209 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 23:53 linux-next d2af0fa4bfa4 4f5f5209 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 22:43 linux-next d2af0fa4bfa4 4f5f5209 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 21:49 linux-next d2af0fa4bfa4 4f5f5209 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 20:20 linux-next d2af0fa4bfa4 4f5f5209 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 19:13 linux-next d2af0fa4bfa4 4f5f5209 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 18:21 linux-next d2af0fa4bfa4 4f5f5209 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 17:08 linux-next d2af0fa4bfa4 4f5f5209 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 15:53 linux-next d2af0fa4bfa4 4f5f5209 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 15:34 linux-next d2af0fa4bfa4 4f5f5209 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 14:29 linux-next d2af0fa4bfa4 4f5f5209 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 13:23 linux-next d2af0fa4bfa4 bcdf85f8 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 13:15 linux-next d2af0fa4bfa4 bcdf85f8 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 12:09 linux-next d2af0fa4bfa4 bcdf85f8 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 10:59 linux-next d2af0fa4bfa4 bcdf85f8 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 09:46 linux-next d2af0fa4bfa4 bcdf85f8 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 08:10 linux-next d2af0fa4bfa4 bcdf85f8 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 06:58 linux-next d2af0fa4bfa4 bcdf85f8 .config console log report info ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 05:56 linux-next c068f40300a0 bcdf85f8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 05:07 linux-next c068f40300a0 bcdf85f8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/20 03:18 linux-next c068f40300a0 bcdf85f8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/02/19 23:30 linux-next c068f40300a0 bcdf85f8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: stack-out-of-bounds Read in unwind_next_frame
2023/03/22 21:03 upstream a1effab7a3a3 d846e076 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: out-of-bounds Read in unwind_next_frame
2020/10/15 04:30 upstream 3e4fb4346c78 fc7735a2 .config console log report info ci-upstream-kasan-gce-selinux-root
2020/10/10 09:15 upstream 6f2f486d57c4 93817d89 .config console log report info ci-upstream-kasan-gce-root
2020/10/01 20:21 upstream fcadab740480 9602ddf4 .config console log report info ci-upstream-kasan-gce
2019/04/22 06:12 upstream 085b7755808a b0e8efcb .config console log report ci-upstream-kasan-gce-smack-root
2018/06/19 15:21 upstream ba4dbdedd3ed 732e4256 .config console log report ci-upstream-kasan-gce
2020/08/13 23:10 upstream 990f227371a4 54ce1ed6 .config console log report ci-upstream-kasan-gce-386
2020/10/16 12:24 bpf 28802e7c0c99 6e262c73 .config console log report info ci-upstream-bpf-kasan-gce
2020/10/12 23:47 bpf 28802e7c0c99 d32b0bbf .config console log report info ci-upstream-bpf-kasan-gce
2020/10/10 18:03 bpf-next ac53a0d3107c 4a77ae0b .config console log report info ci-upstream-bpf-next-kasan-gce
2020/06/09 23:58 net-next-old cb8e59cc8720 092934c1 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.