syzbot


linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+b304e8cb713be5f9d4e1@syzkaller.appspotmail.com
Fix commit: 660585b56e63 fuse: wait for writepages in syncfs
First crash: 522d, last: 518d

Sample crash report:
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:71 [inline]
BUG: KASAN: null-ptr-deref in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline]
BUG: KASAN: null-ptr-deref in fuse_conn_put fs/fuse/inode.c:827 [inline]
BUG: KASAN: null-ptr-deref in fuse_conn_put+0x1d7/0x300 fs/fuse/inode.c:814
Read of size 4 at addr 0000000000000000 by task syz-fuzzer/6555

CPU: 1 PID: 6555 Comm: syz-fuzzer Not tainted 5.14.0-next-20210906-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 __kasan_report mm/kasan/report.c:446 [inline]
 kasan_report.cold+0x66/0xdf mm/kasan/report.c:459
 check_region_inline mm/kasan/generic.c:183 [inline]
 kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189
 instrument_atomic_read include/linux/instrumented.h:71 [inline]
 atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline]
 fuse_conn_put fs/fuse/inode.c:827 [inline]
 fuse_conn_put+0x1d7/0x300 fs/fuse/inode.c:814
 fuse_dev_free+0x155/0x1f0 fs/fuse/inode.c:1324
 fuse_dev_release+0x2a8/0x3f0 fs/fuse/dev.c:2205
 __fput+0x288/0x9f0 fs/file_table.c:280
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:209
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4af19b
Code: fb ff eb bd e8 a6 b6 fb ff e9 61 ff ff ff cc e8 9b 82 fb ff 48 8b 7c 24 10 48 8b 74 24 18 48 8b 54 24 20 48 8b 44 24 08 0f 05 <48> 3d 01 f0 ff ff 76 20 48 c7 44 24 28 ff ff ff ff 48 c7 44 24 30
RSP: 002b:000000c000343430 EFLAGS: 00000206 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 000000c00001e800 RCX: 00000000004af19b
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006
RBP: 000000c000343470 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 000000000000014a
R13: 0000000000000149 R14: 0000000000000200 R15: 000000c00029c3c0
==================================================================

Crashes (18):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-linux-next-kasan-gce-root 2021/09/06 14:03 linux-next 7800ca95d0ed 6ca60148 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/06 14:03 linux-next 7800ca95d0ed 6ca60148 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/06 14:03 linux-next 7800ca95d0ed 6ca60148 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/06 08:53 linux-next 7800ca95d0ed d236a457 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/06 08:53 linux-next 7800ca95d0ed d236a457 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/06 08:53 linux-next 7800ca95d0ed d236a457 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/03 20:56 linux-next 14c6345e6e6c d236a457 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/03 20:56 linux-next 14c6345e6e6c d236a457 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/03 20:56 linux-next 14c6345e6e6c d236a457 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/03 09:17 linux-next 14c6345e6e6c f62a5829 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/03 09:17 linux-next 14c6345e6e6c f62a5829 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/03 09:17 linux-next 14c6345e6e6c f62a5829 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/02 12:16 linux-next 34560ced2059 15cea0a3 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/02 12:16 linux-next 34560ced2059 15cea0a3 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/02 12:16 linux-next 34560ced2059 15cea0a3 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/02 10:19 linux-next 34560ced2059 7eb7e152 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/02 10:19 linux-next 34560ced2059 7eb7e152 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
ci-upstream-linux-next-kasan-gce-root 2021/09/02 10:19 linux-next 34560ced2059 7eb7e152 .config console log report linux-next test error: KASAN: null-ptr-deref Read in fuse_conn_put
* Struck through repros no longer work on HEAD.