syzbot


BUG: stack guard page was hit in sys_listxattr

Status: fixed on 2022/05/12 07:47
Reported-by: syzbot+168f2a44aa4493bd9515@syzkaller.appspotmail.com
Fix commit: 3e45af8a72c0 ANDROID: incremental-fs: limit mount stack depth
First crash: 966d, last: 966d

Sample crash report:
BUG: stack guard page was hit at ffffc90000cffff8 (stack is ffffc90000d00000..ffffc90000d07fff)
kernel stack overflow (double-fault): 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 7822 Comm: syz-executor.0 Not tainted 5.10.109-syzkaller-00693-g414e6c8e941c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:memset+0x6/0x40 mm/kasan/shadow.c:43
Code: 00 00 66 90 55 48 89 e5 89 f6 48 8b 4d 08 ba 01 00 00 00 e8 3c ed ff ff 5d c3 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 57 <41> 56 53 49 89 d7 41 89 f6 48 89 fb 48 8b 4d 08 48 89 d6 ba 01 00
RSP: 0018:ffffc90000d00000 EFLAGS: 00010246
RAX: ffff88811961bb40 RBX: dffffc0000000000 RCX: ffffc90000d00130
RDX: 0000000000000060 RSI: 0000000000000000 RDI: ffffc90000d000a0
RBP: ffffc90000d00008 R08: dffffc0000000000 R09: ffffc90000d00180
R10: fffff520001a0033 R11: 0000000000000000 R12: ffff88811961bb40
R13: ffffc90000d000a0 R14: ffff88811961bb40 R15: 0000000000000000
FS:  00007f9492ad5700(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90000cffff8 CR3: 0000000113732000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __unwind_start+0x34/0x420 arch/x86/kernel/unwind_frame.c:368
 unwind_start arch/x86/include/asm/unwind.h:60 [inline]
 arch_stack_walk+0xdc/0x140 arch/x86/kernel/stacktrace.c:24
 stack_trace_save+0x11b/0x1e0 kernel/stacktrace.c:121
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:428 [inline]
 __kasan_slab_alloc+0xb2/0xe0 mm/kasan/common.c:461
 kasan_slab_alloc include/linux/kasan.h:259 [inline]
 slab_post_alloc_hook mm/slab.h:583 [inline]
 slab_alloc_node mm/slub.c:2956 [inline]
 slab_alloc mm/slub.c:2964 [inline]
 kmem_cache_alloc+0x1a2/0x380 mm/slub.c:2969
 audit_buffer_alloc kernel/audit.c:1778 [inline]
 audit_log_start+0x496/0x9c0 kernel/audit.c:1900
 common_lsm_audit+0xe5/0x1ae0 security/lsm_audit.c:457
 slow_avc_audit+0x25c/0x3b0 security/selinux/avc.c:798
 audit_inode_permission+0x1cb/0x290 security/selinux/hooks.c:3080
 selinux_inode_permission+0x570/0x6a0 security/selinux/hooks.c:3133
 security_inode_permission+0x94/0x120 security/security.c:1234
 inode_permission+0xe0/0x520 fs/namei.c:474
 xattr_permission+0xfb/0x380 fs/xattr.c:134
 __vfs_getxattr+0xb7/0x6a0 fs/xattr.c:373
 vfs_getxattr+0x54/0x60 fs/xattr.c:406
 read_size_attr fs/incfs/vfs.c:293 [inline]
 fetch_regular_inode+0x155/0x300 fs/incfs/vfs.c:374
 dir_lookup+0x673/0x6e0 fs/incfs/vfs.c:1008
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_one_len+0x17f/0x2c0 fs/namei.c:2642
 incfs_lookup_dentry+0x5f/0xb0 fs/incfs/data_mgmt.c:211
 dir_lookup+0x3b8/0x6e0 fs/incfs/vfs.c:967
 __lookup_slow+0x2b3/0x400 fs/namei.c:1628
 lookup_slow fs/namei.c:1645 [inline]
 walk_component+0x516/0x790 fs/namei.c:1940
 lookup_last fs/namei.c:2389 [inline]
 path_lookupat+0x19d/0x6c0 fs/namei.c:2413
 filename_lookup+0x23f/0x6c0 fs/namei.c:2446
 user_path_at_empty+0x40/0x50 fs/namei.c:2726
 user_path_at include/linux/namei.h:59 [inline]
 path_listxattr fs/xattr.c:736 [inline]
 __do_sys_listxattr fs/xattr.c:751 [inline]
 __se_sys_listxattr fs/xattr.c:748 [inline]
 __x64_sys_listxattr+0x106/0x240 fs/xattr.c:748
 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f9493980049
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f9492ad5168 EFLAGS: 00000246 ORIG_RAX: 00000000000000c2
RAX: ffffffffffffffda RBX: 00007f9493a93030 RCX: 00007f9493980049
RDX: 0000000000000010 RSI: 0000000020000340 RDI: 0000000020000000
RBP: 00007f94939da08d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe0d7079ef R14: 00007f9492ad5300 R15: 0000000000022000
Modules linked in:
---[ end trace 0c9958c5d079ab35 ]---
RIP: 0010:memset+0x6/0x40 mm/kasan/shadow.c:43
Code: 00 00 66 90 55 48 89 e5 89 f6 48 8b 4d 08 ba 01 00 00 00 e8 3c ed ff ff 5d c3 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 57 <41> 56 53 49 89 d7 41 89 f6 48 89 fb 48 8b 4d 08 48 89 d6 ba 01 00
RSP: 0018:ffffc90000d00000 EFLAGS: 00010246
RAX: ffff88811961bb40 RBX: dffffc0000000000 RCX: ffffc90000d00130
RDX: 0000000000000060 RSI: 0000000000000000 RDI: ffffc90000d000a0
RBP: ffffc90000d00008 R08: dffffc0000000000 R09: ffffc90000d00180
R10: fffff520001a0033 R11: 0000000000000000 R12: ffff88811961bb40
R13: ffffc90000d000a0 R14: ffff88811961bb40 R15: 0000000000000000
FS:  00007f9492ad5700(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90000cffff8 CR3: 0000000113732000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	00 00                	add    %al,(%rax)
   2:	66 90                	xchg   %ax,%ax
   4:	55                   	push   %rbp
   5:	48 89 e5             	mov    %rsp,%rbp
   8:	89 f6                	mov    %esi,%esi
   a:	48 8b 4d 08          	mov    0x8(%rbp),%rcx
   e:	ba 01 00 00 00       	mov    $0x1,%edx
  13:	e8 3c ed ff ff       	callq  0xffffed54
  18:	5d                   	pop    %rbp
  19:	c3                   	retq
  1a:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
  21:	00 00 00
  24:	55                   	push   %rbp
  25:	48 89 e5             	mov    %rsp,%rbp
  28:	41 57                	push   %r15
* 2a:	41 56                	push   %r14 <-- trapping instruction
  2c:	53                   	push   %rbx
  2d:	49 89 d7             	mov    %rdx,%r15
  30:	41 89 f6             	mov    %esi,%r14d
  33:	48 89 fb             	mov    %rdi,%rbx
  36:	48 8b 4d 08          	mov    0x8(%rbp),%rcx
  3a:	48 89 d6             	mov    %rdx,%rsi
  3d:	ba                   	.byte 0xba
  3e:	01 00                	add    %eax,(%rax)

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/04/02 11:02 android12-5.10-lts 414e6c8e941c 79a2a8fc .config console log report info ci2-android-5-10 BUG: stack guard page was hit in sys_listxattr
* Struck through repros no longer work on HEAD.