syzbot


general protection fault in fsnotify_pre_content

Status: moderation: reported on 2025/02/03 04:27
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+a0199641a38d4fd9f0ef@syzkaller.appspotmail.com
First crash: 6d02h, last: 6d02h

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
CPU: 0 UID: 0 PID: 1036 Comm: kworker/u4:6 Not tainted 6.13.0-syzkaller-08291-g805ba04cb7cc #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Workqueue: loop0 loop_rootcg_workfn
RIP: 0010:fsnotify_parent include/linux/fsnotify.h:81 [inline]
RIP: 0010:fsnotify_pre_content+0x16c/0x5b0 fs/notify/fsnotify.c:220
Code: 5c 24 68 48 89 d8 48 c1 e8 03 4d 89 ee 42 80 3c 28 00 74 08 48 89 df e8 d2 4c da ff 4c 8b 3b 4d 8d 6f 28 4c 89 e8 48 c1 e8 03 <42> 80 3c 30 00 74 08 4c 89 ef e8 b5 4c da ff bb 60 06 00 00 49 03
RSP: 0018:ffffc900026af500 EFLAGS: 00010206
RAX: 0000000000000005 RBX: ffff888044308c28 RCX: ffff888000fea440
RDX: 0000000000000000 RSI: ffffc900026af7c0 RDI: ffffc900026af550
RBP: ffffc900026af5c8 R08: 0000000000000005 R09: ffffffff82366f6d
R10: 0000000000000002 R11: ffff888000fea440 R12: ffff888044308bc0
R13: 0000000000000028 R14: dffffc0000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005578f2d0a0b8 CR3: 0000000011bae000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 fsnotify_file_area_perm include/linux/fsnotify.h:157 [inline]
 rw_verify_area+0x21f/0x630 fs/read_write.c:470
 vfs_iter_read+0x12d/0x460 fs/read_write.c:905
 lo_read_simple drivers/block/loop.c:285 [inline]
 do_req_filebacked drivers/block/loop.c:525 [inline]
 loop_handle_cmd drivers/block/loop.c:1926 [inline]
 loop_process_work+0xd72/0x21c0 drivers/block/loop.c:1961
 process_one_work kernel/workqueue.c:3236 [inline]
 process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3317
 worker_thread+0x870/0xd30 kernel/workqueue.c:3398
 kthread+0x7a9/0x920 kernel/kthread.c:464
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:fsnotify_parent include/linux/fsnotify.h:81 [inline]
RIP: 0010:fsnotify_pre_content+0x16c/0x5b0 fs/notify/fsnotify.c:220
Code: 5c 24 68 48 89 d8 48 c1 e8 03 4d 89 ee 42 80 3c 28 00 74 08 48 89 df e8 d2 4c da ff 4c 8b 3b 4d 8d 6f 28 4c 89 e8 48 c1 e8 03 <42> 80 3c 30 00 74 08 4c 89 ef e8 b5 4c da ff bb 60 06 00 00 49 03
RSP: 0018:ffffc900026af500 EFLAGS: 00010206
RAX: 0000000000000005 RBX: ffff888044308c28 RCX: ffff888000fea440
RDX: 0000000000000000 RSI: ffffc900026af7c0 RDI: ffffc900026af550
RBP: ffffc900026af5c8 R08: 0000000000000005 R09: ffffffff82366f6d
R10: 0000000000000002 R11: ffff888000fea440 R12: ffff888044308bc0
R13: 0000000000000028 R14: dffffc0000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005578f2d0a0b8 CR3: 0000000011bae000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	5c                   	pop    %rsp
   1:	24 68                	and    $0x68,%al
   3:	48 89 d8             	mov    %rbx,%rax
   6:	48 c1 e8 03          	shr    $0x3,%rax
   a:	4d 89 ee             	mov    %r13,%r14
   d:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1)
  12:	74 08                	je     0x1c
  14:	48 89 df             	mov    %rbx,%rdi
  17:	e8 d2 4c da ff       	call   0xffda4cee
  1c:	4c 8b 3b             	mov    (%rbx),%r15
  1f:	4d 8d 6f 28          	lea    0x28(%r15),%r13
  23:	4c 89 e8             	mov    %r13,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 30 00       	cmpb   $0x0,(%rax,%r14,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	4c 89 ef             	mov    %r13,%rdi
  34:	e8 b5 4c da ff       	call   0xffda4cee
  39:	bb 60 06 00 00       	mov    $0x660,%ebx
  3e:	49                   	rex.WB
  3f:	03                   	.byte 0x3

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/30 04:20 upstream 805ba04cb7cc afe4eff5 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root general protection fault in fsnotify_pre_content
* Struck through repros no longer work on HEAD.