[syzbot] [reiserfs?] KASAN: null-ptr-deref Read in __wait_on_buffer

From: syzbot
Date: Fri Apr 14 2023 - 05:50:55 EST


Hello,

syzbot found the following issue on:

HEAD commit: 09a9639e56c0 Linux 6.3-rc6
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12ad32adc80000
kernel config: https://syzkaller.appspot.com/x/.config?x=c21559e740385326
dashboard link: https://syzkaller.appspot.com/bug?extid=f91110fac7f22eb6284f
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/723a785e56e6/disk-09a9639e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/140da8057460/vmlinux-09a9639e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d73b2f2c297c/bzImage-09a9639e.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f91110fac7f22eb6284f@xxxxxxxxxxxxxxxxxxxxxxxxx

==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read include/linux/instrumented.h:72 [inline]
BUG: KASAN: null-ptr-deref in _test_bit_acquire include/asm-generic/bitops/instrumented-non-atomic.h:153 [inline]
BUG: KASAN: null-ptr-deref in wait_on_bit_io include/linux/wait_bit.h:99 [inline]
BUG: KASAN: null-ptr-deref in __wait_on_buffer+0x31/0x70 fs/buffer.c:123
Read of size 8 at addr 0000000000000000 by task syz-executor.2/5538

CPU: 1 PID: 5538 Comm: syz-executor.2 Not tainted 6.3.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106
print_report mm/kasan/report.c:433 [inline]
kasan_report+0xec/0x130 mm/kasan/report.c:536
check_region_inline mm/kasan/generic.c:181 [inline]
kasan_check_range+0x141/0x190 mm/kasan/generic.c:187
instrument_atomic_read include/linux/instrumented.h:72 [inline]
_test_bit_acquire include/asm-generic/bitops/instrumented-non-atomic.h:153 [inline]
wait_on_bit_io include/linux/wait_bit.h:99 [inline]
__wait_on_buffer+0x31/0x70 fs/buffer.c:123
flush_commit_list.isra.0+0xdd6/0x1e70 fs/reiserfs/journal.c:1072
do_journal_end+0x3714/0x4af0 fs/reiserfs/journal.c:4302
do_journal_release fs/reiserfs/journal.c:1917 [inline]
journal_release+0x149/0x630 fs/reiserfs/journal.c:1971
reiserfs_put_super+0xe4/0x5c0 fs/reiserfs/super.c:616
generic_shutdown_super+0x158/0x480 fs/super.c:500
kill_block_super+0x9b/0xf0 fs/super.c:1407
deactivate_locked_super+0x98/0x160 fs/super.c:331
deactivate_super+0xb1/0xd0 fs/super.c:362
cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1177
task_work_run+0x16f/0x270 kernel/task_work.c:179
exit_task_work include/linux/task_work.h:38 [inline]
do_exit+0xad3/0x2960 kernel/exit.c:869
__do_sys_exit kernel/exit.c:986 [inline]
__se_sys_exit kernel/exit.c:984 [inline]
__x64_sys_exit+0x42/0x50 kernel/exit.c:984
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:0x7fee0e88c169
Code: Unable to access opcode bytes at 0x7fee0e88c13f.
RSP: 002b:00007fee0f592118 EFLAGS: 00000246 ORIG_RAX: 000000000000003c
RAX: ffffffffffffffda RBX: 00007fee0e9abf80 RCX: 00007fee0e88c169
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007fee0e8e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc0cf63b9f R14: 00007fee0f592300 R15: 0000000000022000
</TASK>
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxx.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.