syzbot


general protection fault in fsnotify_perm

Status: auto-obsoleted due to no activity on 2024/04/14 02:12
Subsystems: lsm reiserfs
[Documentation on labels]
Reported-by: syzbot+1d7062c505b34792ef90@syzkaller.appspotmail.com
First crash: 338d, last: 145d
Cause bisection: introduced by (bisect log) [merge commit]:
commit 514798d36572fb8eba6ccff3de10c9615063a7f5
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Thu Jul 1 20:26:16 2021 +0000

  Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Crash: BUG: sleeping function called from invalid context in stack_depot_save (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 (1)
Title Replies (including bot) Last reply
[syzbot] [lsm?] [reiserfs?] general protection fault in fsnotify_perm 0 (2) 2024/02/27 16:05
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/06/30 13:40 21m ivan.orlov0322@gmail.com https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2024/02/27 10:53 5h10m bisect fix upstream job log (1)
2024/01/04 23:45 2h25m bisect fix upstream job log (0) log
2023/12/05 05:59 1h50m bisect fix upstream job log (0) log
2023/11/01 00:01 5h06m bisect fix upstream job log (0) log
2023/09/30 18:03 2h29m bisect fix upstream job log (0) log
2023/07/29 20:14 2h05m bisect fix upstream job log (0) log

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
CPU: 0 PID: 4987 Comm: udevd Not tainted 6.4.0-rc7-syzkaller-00226-ga92b7d26c743 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
RIP: 0010:fsnotify_parent include/linux/fsnotify.h:62 [inline]
RIP: 0010:fsnotify_file include/linux/fsnotify.h:99 [inline]
RIP: 0010:fsnotify_perm.part.0+0x12e/0x610 include/linux/fsnotify.h:124
Code: 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 75 04 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 5d 68 48 8d 7b 28 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 5c 04 00 00 4c 8b 73 28 be 08 00 00 00 4d 8d a6
RSP: 0018:ffffc9000347fa00 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000005 RSI: ffffffff83cbf5e3 RDI: 0000000000000028
RBP: ffff888067875bc0 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
R13: ffff88802d0722d0 R14: ffff88802d07233c R15: 0000000000010000
FS:  00007f538cf63c80(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9b7c4d8718 CR3: 000000002eb3f000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 fsnotify_perm include/linux/fsnotify.h:108 [inline]
 security_file_open+0x86/0xb0 security/security.c:2801
 do_dentry_open+0x575/0x13f0 fs/open.c:907
 do_open fs/namei.c:3636 [inline]
 path_openat+0x1baa/0x2750 fs/namei.c:3791
 do_filp_open+0x1ba/0x410 fs/namei.c:3818
 do_sys_openat2+0x16d/0x4c0 fs/open.c:1356
 do_sys_open fs/open.c:1372 [inline]
 __do_sys_openat fs/open.c:1388 [inline]
 __se_sys_openat fs/open.c:1383 [inline]
 __x64_sys_openat+0x143/0x1f0 fs/open.c:1383
 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
RIP: 0033:0x7f538cb169a4
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:00007fff8a905c40 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f538cb169a4
RDX: 0000000000080241 RSI: 00007fff8a906188 RDI: 00000000ffffff9c
RBP: 00007fff8a906188 R08: 0000000000000004 R09: 0000000000000001
R10: 00000000000001b6 R11: 0000000000000246 R12: 0000000000080241
R13: 000056095d45972e R14: 0000000000000001 R15: 000056095e6332c0
 </TASK>
Modules linked in:
----------------
Code disassembly (best guess):
   0:	48 89 fa             	mov    %rdi,%rdx
   3:	48 c1 ea 03          	shr    $0x3,%rdx
   7:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   b:	0f 85 75 04 00 00    	jne    0x486
  11:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  18:	fc ff df
  1b:	48 8b 5d 68          	mov    0x68(%rbp),%rbx
  1f:	48 8d 7b 28          	lea    0x28(%rbx),%rdi
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 5c 04 00 00    	jne    0x490
  34:	4c 8b 73 28          	mov    0x28(%rbx),%r14
  38:	be 08 00 00 00       	mov    $0x8,%esi
  3d:	4d                   	rex.WRB
  3e:	8d                   	.byte 0x8d
  3f:	a6                   	cmpsb  %es:(%rdi),%ds:(%rsi)

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/25 17:38 upstream a92b7d26c743 09ffe269 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root general protection fault in fsnotify_perm
* Struck through repros no longer work on HEAD.