syzbot


BUG: unable to handle kernel NULL pointer dereference in bdi_put

Status: auto-closed as invalid on 2021/02/19 09:51
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+8b0c095e42743298b166@syzkaller.appspotmail.com
First crash: 1229d, last: 1222d

Sample crash report:
BUG: kernel NULL pointer dereference, address: 0000000000000040
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD 1d654067 
P4D 1d654067 PUD 1d655067 
PMD 0 

Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 4203 Comm: syz-executor.1 Not tainted 5.10.0-next-20201221-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:arch_atomic_fetch_sub arch/x86/include/asm/atomic.h:190 [inline]
RIP: 0010:atomic_fetch_sub_release include/asm-generic/atomic-instrumented.h:221 [inline]
RIP: 0010:__refcount_sub_and_test include/linux/refcount.h:272 [inline]
RIP: 0010:__refcount_dec_and_test include/linux/refcount.h:315 [inline]
RIP: 0010:refcount_dec_and_test include/linux/refcount.h:333 [inline]
RIP: 0010:kref_put include/linux/kref.h:64 [inline]
RIP: 0010:bdi_put+0x22/0xa0 mm/backing-dev.c:901
Code: 0f 1f 84 00 00 00 00 00 41 54 55 48 89 fd 53 4c 8d 65 40 bb ff ff ff ff e8 4b 25 d2 ff be 04 00 00 00 4c 89 e7 e8 0e 7b 15 00 <f0> 0f c1 5d 40 bf 01 00 00 00 89 de e8 ad 2c d2 ff 83 fb 01 74 2d
RSP: 0018:ffffc900025af860 EFLAGS: 00010202

RAX: 0000000000000001 RBX: 00000000ffffffff RCX: ffffffff81a125d2
RDX: 0000000000000001 RSI: 0000000000000004 RDI: 0000000000000040
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000044
R10: ffffffff81c8b17d R11: 0000000000000001 R12: 0000000000000040
R13: ffff888143d69410 R14: ffffffff89798220 R15: ffff88802f578980
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000040 CR3: 000000002b7e3000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
Call Trace:
 bdev_evict_inode+0x280/0x4a0 fs/block_dev.c:809
 evict+0x2ed/0x6b0 fs/inode.c:577
 iput_final fs/inode.c:1651 [inline]
 iput.part.0+0x41e/0x840 fs/inode.c:1677
 iput+0x58/0x70 fs/inode.c:1667
 dentry_unlink_inode+0x2b1/0x3d0 fs/dcache.c:374
 __dentry_kill+0x3c0/0x640 fs/dcache.c:579
 dentry_kill fs/dcache.c:705 [inline]
 dput+0x786/0xc10 fs/dcache.c:878
 do_one_tree fs/dcache.c:1625 [inline]
 shrink_dcache_for_umount+0x11f/0x330 fs/dcache.c:1639
 generic_shutdown_super+0x68/0x370 fs/super.c:447
 kill_anon_super+0x36/0x60 fs/super.c:1055
 deactivate_locked_super+0x94/0x160 fs/super.c:335
 deactivate_super+0xad/0xd0 fs/super.c:366
 cleanup_mnt+0x3a3/0x530 fs/namespace.c:1123
 task_work_run+0xdd/0x190 kernel/task_work.c:140
 exit_task_work include/linux/task_work.h:30 [inline]
 do_exit+0xb89/0x2a00 kernel/exit.c:823
 do_group_exit+0x125/0x310 kernel/exit.c:920
 get_signal+0x3e9/0x2160 kernel/signal.c:2770
 arch_do_signal_or_restart+0x2a8/0x1eb0 arch/x86/kernel/signal.c:811
 handle_signal_work kernel/entry/common.c:147 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
 exit_to_user_mode_prepare+0x124/0x200 kernel/entry/common.c:201
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:302
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45e149
Code: Unable to access opcode bytes at RIP 0x45e11f.
RSP: 002b:00007fa006647c68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffea RBX: 0000000000000005 RCX: 000000000045e149
RDX: 00000000200001c0 RSI: 0000000020000300 RDI: 0000000000000000
RBP: 000000000119c318 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119c2d4
R13: 00007fff69e48c1f R14: 00007fa0066489c0 R15: 000000000119c2d4
Modules linked in:
CR2: 0000000000000040
---[ end trace 41adf0238c666424 ]---
RIP: 0010:arch_atomic_fetch_sub arch/x86/include/asm/atomic.h:190 [inline]
RIP: 0010:atomic_fetch_sub_release include/asm-generic/atomic-instrumented.h:221 [inline]
RIP: 0010:__refcount_sub_and_test include/linux/refcount.h:272 [inline]
RIP: 0010:__refcount_dec_and_test include/linux/refcount.h:315 [inline]
RIP: 0010:refcount_dec_and_test include/linux/refcount.h:333 [inline]
RIP: 0010:kref_put include/linux/kref.h:64 [inline]
RIP: 0010:bdi_put+0x22/0xa0 mm/backing-dev.c:901
Code: 0f 1f 84 00 00 00 00 00 41 54 55 48 89 fd 53 4c 8d 65 40 bb ff ff ff ff e8 4b 25 d2 ff be 04 00 00 00 4c 89 e7 e8 0e 7b 15 00 <f0> 0f c1 5d 40 bf 01 00 00 00 89 de e8 ad 2c d2 ff 83 fb 01 74 2d
RSP: 0018:ffffc900025af860 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 00000000ffffffff RCX: ffffffff81a125d2
RDX: 0000000000000001 RSI: 0000000000000004 RDI: 0000000000000040
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000044
R10: ffffffff81c8b17d R11: 0000000000000001 R12: 0000000000000040
R13: ffff888143d69410 R14: ffffffff89798220 R15: ffff88802f578980
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000040 CR3: 000000002b7e3000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/21 09:50 linux-next 4c6ed015c2a5 04201c06 .config console log report info ci-upstream-linux-next-kasan-gce-root
2020/12/14 07:10 linux-next 14240d4c5b25 b22a7ec3 .config console log report info ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.