syzbot


stack segment fault in __stack_depot_save

Status: upstream: reported C repro on 2023/07/24 16:18
Subsystems: mm net
[Documentation on labels]
Reported-by: syzbot+1f564413055af2023f17@syzkaller.appspotmail.com
First crash: 130d, last: 13d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: KASAN: out-of-bounds Read in leaf_paste_entries (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [net?] [reiserfs?] [fat?] stack segment fault in __stack_depot_save 0 (1) 2023/07/24 16:18
Last patch testing requests (2)
Created Duration User Patch Repo Result
2023/09/08 01:51 19m retest repro upstream report log
2023/09/08 01:51 23m retest repro upstream report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2023/11/16 12:07 6h02m bisect fix upstream job log (0) log
2023/10/14 03:00 2h52m bisect fix upstream job log (0) log

Sample crash report:
traps: klogd[4465] general protection fault ip:7f94a7ffcfaf sp:7ffd5922ebc8 error:0 in libc.so.6[7f94a7f50000+123000]
stack segment: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 4465 Comm: klogd Not tainted 6.5.0-rc7-syzkaller-00022-ga5e505a99ca7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
RIP: 0010:find_stack lib/stackdepot.c:350 [inline]
RIP: 0010:__stack_depot_save+0x15e/0x510 lib/stackdepot.c:390
Code: 29 c0 89 c3 48 8b 05 69 7f f0 0d 89 d9 23 0d 59 7f f0 0d 48 8d 0c c8 48 8b 29 48 85 ed 75 0b eb 70 48 8b 6d 00 48 85 ed 74 67 <39> 5d 08 75 f2 44 3b 7d 0c 75 ec 31 c0 48 8b 74 c5 18 49 39 34 c6
RSP: 0018:ffffc9000315f248 EFLAGS: 00010202
RAX: ffff88823b400000 RBX: 000000000998e8ec RCX: ffff88823b874760
RDX: 0000000000000010 RSI: 0000000000000002 RDI: 00000000d60c37e5
RBP: 048a017300000010 R08: 00000000b039b48a R09: ffffffff8f333fa0
R10: ffffc9000315f180 R11: 000000000000519b R12: 0000000000000001
R13: 0000000000002800 R14: ffffc9000315f2d0 R15: 0000000000000010
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000fffffffe CR3: 00000000275ba000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 save_stack+0x16d/0x1f0 mm/page_owner.c:129
 __set_page_owner+0x1f/0x60 mm/page_owner.c:192
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x2d2/0x350 mm/page_alloc.c:1570
 prep_new_page mm/page_alloc.c:1577 [inline]
 get_page_from_freelist+0x10a9/0x31e0 mm/page_alloc.c:3221
 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4477
 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2292
 __get_free_pages+0xc/0x40 mm/page_alloc.c:4527
 tlb_next_batch mm/mmu_gather.c:35 [inline]
 __tlb_remove_page_size+0x2a6/0x470 mm/mmu_gather.c:135
 __tlb_remove_page include/asm-generic/tlb.h:472 [inline]
 zap_pte_range mm/memory.c:1457 [inline]
 zap_pmd_range mm/memory.c:1570 [inline]
 zap_pud_range mm/memory.c:1599 [inline]
 zap_p4d_range mm/memory.c:1620 [inline]
 unmap_page_range+0x123b/0x32e0 mm/memory.c:1641
 unmap_single_vma+0x194/0x2b0 mm/memory.c:1687
 unmap_vmas+0x267/0x3c0 mm/memory.c:1726
 exit_mmap+0x1a7/0x960 mm/mmap.c:3203
 __mmput+0x12a/0x4d0 kernel/fork.c:1348
 mmput+0x62/0x70 kernel/fork.c:1370
 exit_mm kernel/exit.c:567 [inline]
 do_exit+0x9b4/0x2a20 kernel/exit.c:861
 do_group_exit+0xd4/0x2a0 kernel/exit.c:1024
 get_signal+0x23ea/0x2770 kernel/signal.c:2881
 arch_do_signal_or_restart+0x89/0x5f0 arch/x86/kernel/signal.c:308
 exit_to_user_mode_loop kernel/entry/common.c:168 [inline]
 exit_to_user_mode_prepare+0x11f/0x240 kernel/entry/common.c:204
 irqentry_exit_to_user_mode+0x9/0x40 kernel/entry/common.c:310
 asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:564
RIP: 0033:0x7f94a7ffcfaf
Code: Unable to access opcode bytes at 0x7f94a7ffcf85.
RSP: 002b:00007ffd5922ebc8 EFLAGS: 00010207
RAX: 00000000000000a1 RBX: 00007f94a819b4a0 RCX: 00007f94a7ffcfa7
RDX: 00000000000003ff RSI: 00007f94a819b4a0 RDI: 0000000000000002
RBP: 0000000000000000 R08: 0000000000000007 R09: 880f8688691daff0
R10: 0000000000004000 R11: 0000000000000206 R12: 00007f94a819b4a0
R13: 00007f94a818b212 R14: 00007f94a819b546 R15: 00007f94a819b546
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:find_stack lib/stackdepot.c:350 [inline]
RIP: 0010:__stack_depot_save+0x15e/0x510 lib/stackdepot.c:390
Code: 29 c0 89 c3 48 8b 05 69 7f f0 0d 89 d9 23 0d 59 7f f0 0d 48 8d 0c c8 48 8b 29 48 85 ed 75 0b eb 70 48 8b 6d 00 48 85 ed 74 67 <39> 5d 08 75 f2 44 3b 7d 0c 75 ec 31 c0 48 8b 74 c5 18 49 39 34 c6
RSP: 0018:ffffc9000315f248 EFLAGS: 00010202

RAX: ffff88823b400000 RBX: 000000000998e8ec RCX: ffff88823b874760
RDX: 0000000000000010 RSI: 0000000000000002 RDI: 00000000d60c37e5
RBP: 048a017300000010 R08: 00000000b039b48a R09: ffffffff8f333fa0
R10: ffffc9000315f180 R11: 000000000000519b R12: 0000000000000001
R13: 0000000000002800 R14: ffffc9000315f2d0 R15: 0000000000000010
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000fffffffe CR3: 00000000275ba000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess):
   0:	29 c0                	sub    %eax,%eax
   2:	89 c3                	mov    %eax,%ebx
   4:	48 8b 05 69 7f f0 0d 	mov    0xdf07f69(%rip),%rax        # 0xdf07f74
   b:	89 d9                	mov    %ebx,%ecx
   d:	23 0d 59 7f f0 0d    	and    0xdf07f59(%rip),%ecx        # 0xdf07f6c
  13:	48 8d 0c c8          	lea    (%rax,%rcx,8),%rcx
  17:	48 8b 29             	mov    (%rcx),%rbp
  1a:	48 85 ed             	test   %rbp,%rbp
  1d:	75 0b                	jne    0x2a
  1f:	eb 70                	jmp    0x91
  21:	48 8b 6d 00          	mov    0x0(%rbp),%rbp
  25:	48 85 ed             	test   %rbp,%rbp
  28:	74 67                	je     0x91
* 2a:	39 5d 08             	cmp    %ebx,0x8(%rbp) <-- trapping instruction
  2d:	75 f2                	jne    0x21
  2f:	44 3b 7d 0c          	cmp    0xc(%rbp),%r15d
  33:	75 ec                	jne    0x21
  35:	31 c0                	xor    %eax,%eax
  37:	48 8b 74 c5 18       	mov    0x18(%rbp,%rax,8),%rsi
  3c:	49 39 34 c6          	cmp    %rsi,(%r14,%rax,8)

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/24 05:03 upstream a5e505a99ca7 4d7ae7ab .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root stack segment fault in __stack_depot_save
2023/07/22 12:29 upstream d192f5382581 27cbe77f .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root stack segment fault in __stack_depot_save
* Struck through repros no longer work on HEAD.