syzbot


stack segment fault in __stack_depot_save

Status: auto-obsoleted due to no activity on 2024/04/11 00:20
Subsystems: mm net kernfs
[Documentation on labels]
Reported-by: syzbot+1f564413055af2023f17@syzkaller.appspotmail.com
First crash: 279d, last: 116d
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
  
Fix bisection: fixed by (bisect log) :
commit 6f861765464f43a71462d52026fbddfc858239a5
Author: Jan Kara <jack@suse.cz>
Date: Wed Nov 1 17:43:10 2023 +0000

  fs: Block writes to mounted block devices

  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [net?] [reiserfs?] [fat?] stack segment fault in __stack_depot_save 0 (2) 2024/02/23 22:14
[syzbot] Monthly kernfs report (Jan 2024) 0 (1) 2024/01/02 13:36
Last patch testing requests (6)
Created Duration User Patch Repo Result
2024/02/08 19:49 29m retest repro upstream OK log
2024/01/27 08:37 30m retest repro upstream OK log
2023/12/16 23:33 21m retest repro upstream report log
2023/11/30 18:42 15m retest repro upstream report log
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 (4)
Created Duration User Patch Repo Result
2024/02/23 16:52 5h21m bisect fix upstream job log (1)
2024/01/01 22:14 2h06m bisect fix upstream job log (0) log
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:
stack segment: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 4525 Comm: udevd Not tainted 6.7.0-rc3-syzkaller-00284-g815fb87b7530 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
RIP: 0010:find_stack lib/stackdepot.c:350 [inline]
RIP: 0010:__stack_depot_save+0x15e/0x520 lib/stackdepot.c:390
Code: 29 c0 89 c3 48 8b 05 f9 df 15 0e 89 d9 23 0d e9 df 15 0e 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:ffffc9000313f5c0 EFLAGS: 00010202

RAX: ffff88823b400000 RBX: 0000000002972db3 RCX: ffff88823b796d98
RDX: 000000000000000f RSI: 0000000000000003 RDI: 000000001871a4f5
RBP: 1f0f66c35b044389 R08: 000000008c47e937 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000004 R12: 0000000000000001
R13: 0000000000000dc0 R14: ffffc9000313f628 R15: 000000000000000f
FS:  00007f1a013b6c80(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffeaa65d000 CR3: 0000000018334000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 kasan_save_stack+0x43/0x50 mm/kasan/common.c:46
 kasan_set_track+0x25/0x30 mm/kasan/common.c:52
 __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328
 kasan_slab_alloc include/linux/kasan.h:188 [inline]
 slab_post_alloc_hook mm/slab.h:763 [inline]
 slab_alloc_node mm/slub.c:3478 [inline]
 slab_alloc mm/slub.c:3486 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3493 [inline]
 kmem_cache_alloc+0x15d/0x2f0 mm/slub.c:3502
 kmem_cache_zalloc include/linux/slab.h:711 [inline]
 __kernfs_iattrs+0xb8/0x3f0 fs/kernfs/inode.c:37
 kernfs_iattrs fs/kernfs/inode.c:60 [inline]
 __kernfs_setattr+0x4d/0x3c0 fs/kernfs/inode.c:73
 kernfs_iop_setattr+0x120/0x180 fs/kernfs/inode.c:127
 notify_change+0x742/0x11c0 fs/attr.c:499
 do_truncate+0x15c/0x220 fs/open.c:66
 handle_truncate fs/namei.c:3280 [inline]
 do_open fs/namei.c:3626 [inline]
 path_openat+0x25a0/0x2c50 fs/namei.c:3779
 do_filp_open+0x1de/0x430 fs/namei.c:3809
 do_sys_openat2+0x176/0x1e0 fs/open.c:1440
 do_sys_open fs/open.c:1455 [inline]
 __do_sys_openat fs/open.c:1471 [inline]
 __se_sys_openat fs/open.c:1466 [inline]
 __x64_sys_openat+0x175/0x210 fs/open.c:1466
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f1a00f169a4
Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007ffef1d9c270 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f1a00f169a4
RDX: 0000000000080241 RSI: 00007ffef1d9c6a8 RDI: 00000000ffffff9c
RBP: 00007ffef1d9c6a8 R08: 0000000000000004 R09: 0000000000000001
R10: 00000000000001b6 R11: 0000000000000246 R12: 0000000000080241
R13: 0000564c2e53f72e R14: 0000000000000001 R15: 0000000000000000
 </TASK>
Modules linked in:
----------------
Code disassembly (best guess):
   0:	29 c0                	sub    %eax,%eax
   2:	89 c3                	mov    %eax,%ebx
   4:	48 8b 05 f9 df 15 0e 	mov    0xe15dff9(%rip),%rax        # 0xe15e004
   b:	89 d9                	mov    %ebx,%ecx
   d:	23 0d e9 df 15 0e    	and    0xe15dfe9(%rip),%ecx        # 0xe15dffc
  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 (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/02 22:09 upstream 815fb87b7530 f819d6f7 .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/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.