syzbot


KASAN: null-ptr-deref Write in vfs_rmdir

Status: upstream: reported C repro on 2024/04/11 05:14
Reported-by: syzbot+1f38b4bccc03c336b205@syzkaller.appspotmail.com
First crash: 72d, last: 2d16h
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 KASAN: null-ptr-deref Write in vfs_rmdir origin:downstream C 5 1d01h 72d 0/2 upstream: reported C repro on 2024/04/11 17:58
android-6-1 KASAN: null-ptr-deref Write in vfs_rmdir origin:downstream C 50 1d13h 72d 0/2 upstream: reported C repro on 2024/04/11 09:39
android-54 KASAN: null-ptr-deref Write in vfs_rmdir C 30 13d 72d 0/2 upstream: reported C repro on 2024/04/11 05:33

Sample crash report:
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 00007f096f4b3350 R08: ffffffffffffffb8 R09: 0000000000000000
R10: 0000000000001000 R11: 0000000000000246 R12: 00007f096f4b3350
R13: 0000000000000000 R14: 00007f096f4b3da0 R15: 00007f096f4088f0
---[ end trace 84092e9bf4af7d85 ]---
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
BUG: KASAN: null-ptr-deref in atomic_inc_return include/asm-generic/atomic-instrumented.h:250 [inline]
BUG: KASAN: null-ptr-deref in ihold+0x20/0x60 fs/inode.c:423
Write of size 4 at addr 0000000000000170 by task syz-executor346/287

CPU: 1 PID: 287 Comm: syz-executor346 Tainted: G        W         5.10.209-syzkaller-00002-g4e1bc8d8e8ae #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118
 __kasan_report mm/kasan/report.c:439 [inline]
 kasan_report+0x167/0x1c0 mm/kasan/report.c:452
 kasan_check_range+0x293/0x2a0 mm/kasan/generic.c:189
 __kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37
 instrument_atomic_read_write include/linux/instrumented.h:101 [inline]
 atomic_inc_return include/asm-generic/atomic-instrumented.h:250 [inline]
 ihold+0x20/0x60 fs/inode.c:423
 d_delete_notify include/linux/fsnotify.h:258 [inline]
 vfs_rmdir+0x200/0x3f0 fs/namei.c:3871
 incfs_kill_sb+0x108/0x220 fs/incfs/vfs.c:1945
 deactivate_locked_super+0xad/0x110 fs/super.c:335
 deactivate_super+0xbe/0xf0 fs/super.c:366
 cleanup_mnt+0x45c/0x510 fs/namespace.c:1118
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1125
 task_work_run+0x129/0x190 kernel/task_work.c:164
 exit_task_work include/linux/task_work.h:32 [inline]
 do_exit+0xc83/0x2a50 kernel/exit.c:861
 do_group_exit+0x141/0x310 kernel/exit.c:983
 __do_sys_exit_group kernel/exit.c:994 [inline]
 __se_sys_exit_group kernel/exit.c:992 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:992
 do_syscall_64+0x34/0x70
 entry_SYSCALL_64_after_hwframe+0x61/0xc6
RIP: 0033:0x7f096f437909
Code: Unable to access opcode bytes at RIP 0x7f096f4378df.
RSP: 002b:00007fff940343c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f096f437909
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 00007f096f4b3350 R08: ffffffffffffffb8 R09: 0000000000000000
R10: 0000000000001000 R11: 0000000000000246 R12: 00007f096f4b3350
R13: 0000000000000000 R14: 00007f096f4b3da0 R15: 00007f096f4088f0
==================================================================
BUG: kernel NULL pointer dereference, address: 0000000000000170
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 0 P4D 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 287 Comm: syz-executor346 Tainted: G    B   W         5.10.209-syzkaller-00002-g4e1bc8d8e8ae #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:arch_atomic_inc_return include/linux/atomic-arch-fallback.h:286 [inline]
RIP: 0010:atomic_inc_return include/asm-generic/atomic-instrumented.h:251 [inline]
RIP: 0010:ihold+0x25/0x60 fs/inode.c:423
Code: 00 00 00 00 00 55 48 89 e5 41 56 53 49 89 fe e8 b1 56 b3 ff 49 8d be 70 01 00 00 be 04 00 00 00 e8 00 d4 f0 ff bb 01 00 00 00 <f0> 41 0f c1 9e 70 01 00 00 ff c3 bf 02 00 00 00 89 de e8 34 5a b3
RSP: 0018:ffffc90000b07b48 EFLAGS: 00010246
RAX: ffff88811d163b00 RBX: 0000000000000001 RCX: ffff88811d163b40
RDX: 0000000000000000 RSI: 0000000000000286 RDI: 00000000ffffffff
RBP: ffffc90000b07b58 R08: ffffffff813e2edb R09: 0000000000000003
R10: fffffbfff0e10248 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff88811c52a770 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000170 CR3: 000000010bab6000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 d_delete_notify include/linux/fsnotify.h:258 [inline]
 vfs_rmdir+0x200/0x3f0 fs/namei.c:3871
 incfs_kill_sb+0x108/0x220 fs/incfs/vfs.c:1945
 deactivate_locked_super+0xad/0x110 fs/super.c:335
 deactivate_super+0xbe/0xf0 fs/super.c:366
 cleanup_mnt+0x45c/0x510 fs/namespace.c:1118
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1125
 task_work_run+0x129/0x190 kernel/task_work.c:164
 exit_task_work include/linux/task_work.h:32 [inline]
 do_exit+0xc83/0x2a50 kernel/exit.c:861
 do_group_exit+0x141/0x310 kernel/exit.c:983
 __do_sys_exit_group kernel/exit.c:994 [inline]
 __se_sys_exit_group kernel/exit.c:992 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:992
 do_syscall_64+0x34/0x70
 entry_SYSCALL_64_after_hwframe+0x61/0xc6
RIP: 0033:0x7f096f437909
Code: Unable to access opcode bytes at RIP 0x7f096f4378df.
RSP: 002b:00007fff940343c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f096f437909
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 00007f096f4b3350 R08: ffffffffffffffb8 R09: 0000000000000000
R10: 0000000000001000 R11: 0000000000000246 R12: 00007f096f4b3350
R13: 0000000000000000 R14: 00007f096f4b3da0 R15: 00007f096f4088f0
Modules linked in:
CR2: 0000000000000170
---[ end trace 84092e9bf4af7d86 ]---
RIP: 0010:arch_atomic_inc_return include/linux/atomic-arch-fallback.h:286 [inline]
RIP: 0010:atomic_inc_return include/asm-generic/atomic-instrumented.h:251 [inline]
RIP: 0010:ihold+0x25/0x60 fs/inode.c:423
Code: 00 00 00 00 00 55 48 89 e5 41 56 53 49 89 fe e8 b1 56 b3 ff 49 8d be 70 01 00 00 be 04 00 00 00 e8 00 d4 f0 ff bb 01 00 00 00 <f0> 41 0f c1 9e 70 01 00 00 ff c3 bf 02 00 00 00 89 de e8 34 5a b3
RSP: 0018:ffffc90000b07b48 EFLAGS: 00010246
RAX: ffff88811d163b00 RBX: 0000000000000001 RCX: ffff88811d163b40
RDX: 0000000000000000 RSI: 0000000000000286 RDI: 00000000ffffffff
RBP: ffffc90000b07b58 R08: ffffffff813e2edb R09: 0000000000000003
R10: fffffbfff0e10248 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff88811c52a770 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000170 CR3: 000000010bab6000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	00 00                	add    %al,(%rax)
   2:	00 00                	add    %al,(%rax)
   4:	00 55 48             	add    %dl,0x48(%rbp)
   7:	89 e5                	mov    %esp,%ebp
   9:	41 56                	push   %r14
   b:	53                   	push   %rbx
   c:	49 89 fe             	mov    %rdi,%r14
   f:	e8 b1 56 b3 ff       	call   0xffb356c5
  14:	49 8d be 70 01 00 00 	lea    0x170(%r14),%rdi
  1b:	be 04 00 00 00       	mov    $0x4,%esi
  20:	e8 00 d4 f0 ff       	call   0xfff0d425
  25:	bb 01 00 00 00       	mov    $0x1,%ebx
* 2a:	f0 41 0f c1 9e 70 01 	lock xadd %ebx,0x170(%r14) <-- trapping instruction
  31:	00 00
  33:	ff c3                	inc    %ebx
  35:	bf 02 00 00 00       	mov    $0x2,%edi
  3a:	89 de                	mov    %ebx,%esi
  3c:	e8                   	.byte 0xe8
  3d:	34 5a                	xor    $0x5a,%al
  3f:	b3                   	.byte 0xb3

Crashes (222):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/11 19:54 android13-5.10-lts 4e1bc8d8e8ae 95ed9ece .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/04/11 10:32 android13-5.10-lts 4e1bc8d8e8ae 33b9e058 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/04/11 05:08 android13-5.10-lts 4e1bc8d8e8ae 33b9e058 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/06/20 05:25 android13-5.10-lts b58b8f9dad93 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/06/19 19:30 android13-5.10-lts b58b8f9dad93 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/06/19 16:21 android13-5.10-lts b58b8f9dad93 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/06/19 16:16 android13-5.10-lts b58b8f9dad93 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/06/13 18:30 android13-5.10-lts d3c4d815bf09 a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/06/13 18:28 android13-5.10-lts d3c4d815bf09 a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/06/09 13:09 android13-5.10-lts d3c4d815bf09 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/06/07 03:51 android13-5.10-lts d3c4d815bf09 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/06/03 05:18 android13-5.10-lts 22b064ea5cbc 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/06/02 21:51 android13-5.10-lts 22b064ea5cbc 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/06/02 05:06 android13-5.10-lts 22b064ea5cbc 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/06/02 05:04 android13-5.10-lts 22b064ea5cbc 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/31 16:58 android13-5.10-lts a8e7f812fbc1 0c378259 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/31 05:12 android13-5.10-lts a8e7f812fbc1 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/31 00:36 android13-5.10-lts a8e7f812fbc1 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/26 23:26 android13-5.10-lts a8e7f812fbc1 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/26 05:23 android13-5.10-lts a8e7f812fbc1 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/24 10:57 android13-5.10-lts a8e7f812fbc1 8f98448e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/21 03:53 android13-5.10-lts 70b6ab09a34b c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/19 19:23 android13-5.10-lts 70b6ab09a34b c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/19 04:52 android13-5.10-lts 70b6ab09a34b c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/16 20:17 android13-5.10-lts 70b6ab09a34b c2e07261 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/14 10:07 android13-5.10-lts 70b6ab09a34b fdb4c10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/12 20:32 android13-5.10-lts 70b6ab09a34b 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/12 13:26 android13-5.10-lts 70b6ab09a34b 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/11 06:34 android13-5.10-lts 70b6ab09a34b f7c35481 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/11 06:34 android13-5.10-lts 70b6ab09a34b f7c35481 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/09 04:56 android13-5.10-lts 70b6ab09a34b 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/09 01:52 android13-5.10-lts 70b6ab09a34b 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/08 21:44 android13-5.10-lts 70b6ab09a34b 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/06 18:59 android13-5.10-lts 70b6ab09a34b d884b519 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/06 01:48 android13-5.10-lts 70b6ab09a34b 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/05 12:11 android13-5.10-lts 70b6ab09a34b 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/05 08:28 android13-5.10-lts 70b6ab09a34b 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/05 04:46 android13-5.10-lts 70b6ab09a34b 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/05 03:10 android13-5.10-lts 70b6ab09a34b 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/05 03:09 android13-5.10-lts 70b6ab09a34b 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/05 01:11 android13-5.10-lts 70b6ab09a34b 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/04 20:08 android13-5.10-lts 70b6ab09a34b 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/03 17:41 android13-5.10-lts 70b6ab09a34b dd26401e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/02 19:54 android13-5.10-lts 70b6ab09a34b 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/02 17:06 android13-5.10-lts 70b6ab09a34b 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/05/02 03:47 android13-5.10-lts 70b6ab09a34b 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
2024/04/11 04:32 android13-5.10-lts 4e1bc8d8e8ae 33b9e058 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: null-ptr-deref Write in vfs_rmdir
* Struck through repros no longer work on HEAD.