Hello,
syzbot found the following crash on:
HEAD commit: 4520f06b Linux 4.14.175
git tree: linux-4.14.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=148e4557e00000
kernel config:
https://syzkaller.appspot.com/x/.config?x=93cf891381c0c347
dashboard link:
https://syzkaller.appspot.com/bug?extid=7e141a7bc0e3beee9d49
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
Unfortunately, I don't have any reproducer for this crash yet.
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by:
syzbot+7e141a...@syzkaller.appspotmail.com
attempt to access beyond end of device
loop3: rw=0, want=94114, limit=52
Process accounting resumed
MINIX-fs: mounting unchecked file system, running fsck is recommended
==================================================================
BUG: KASAN: use-after-free in alloc_branch fs/minix/itree_common.c:92 [inline]
BUG: KASAN: use-after-free in get_block+0xfaa/0x10f0 fs/minix/itree_common.c:191
Write of size 2 at addr ffff888021eebdba by task syz-executor.3/6350
CPU: 1 PID: 6350 Comm: syz-executor.3 Not tainted 4.14.175-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x13e/0x194 lib/dump_stack.c:58
print_address_description.cold+0x7c/0x1e2 mm/kasan/report.c:252
kasan_report_error mm/kasan/report.c:351 [inline]
kasan_report mm/kasan/report.c:409 [inline]
kasan_report.cold+0xa9/0x2ae mm/kasan/report.c:393
alloc_branch fs/minix/itree_common.c:92 [inline]
get_block+0xfaa/0x10f0 fs/minix/itree_common.c:191
minix_get_block+0xd6/0x100 fs/minix/inode.c:379
__block_write_begin_int+0x337/0x1030 fs/buffer.c:2027
__block_write_begin fs/buffer.c:2077 [inline]
block_write_begin+0x58/0x260 fs/buffer.c:2136
minix_write_begin+0x35/0xc0 fs/minix/inode.c:415
generic_perform_write+0x1c9/0x420 mm/filemap.c:3047
__generic_file_write_iter+0x227/0x590 mm/filemap.c:3172
generic_file_write_iter+0x2fa/0x650 mm/filemap.c:3200
call_write_iter include/linux/fs.h:1778 [inline]
new_sync_write fs/read_write.c:469 [inline]
__vfs_write+0x44e/0x630 fs/read_write.c:482
__kernel_write+0xf5/0x330 fs/read_write.c:501
do_acct_process+0xb49/0xf60 kernel/acct.c:520
acct_pin_kill+0x28/0xe0 kernel/acct.c:174
pin_kill+0x147/0x650 fs/fs_pin.c:50
mnt_pin_kill+0x62/0x170 fs/fs_pin.c:87
cleanup_mnt+0x110/0x140 fs/namespace.c:1180
task_work_run+0x113/0x190 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:191 [inline]
exit_to_usermode_loop+0x1d6/0x220 arch/x86/entry/common.c:164
prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45f2b7
RSP: 002b:00007ffed108e658 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000045f2b7
RDX: 0000000000402f88 RSI: 0000000000000002 RDI: 00007ffed108e700
RBP: 00000000000002cf R08: 0000000000000000 R09: 000000000000000b
R10: 0000000000000005 R11: 0000000000000246 R12: 00007ffed108f790
R13: 0000000001d42940 R14: 0000000000000000 R15: 00007ffed108f790
The buggy address belongs to the page:
page:ffffea000087bac0 count:0 mapcount:0 mapping: (null) index:0x1
flags: 0xfffe0000000000()
raw: 00fffe0000000000 0000000000000000 0000000000000001 00000000ffffffff
raw: ffffea0000935220 ffffea00008e7920 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff888021eebc80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888021eebd00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888021eebd80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888021eebe00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888021eebe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
MINIX-fs: mounting unchecked file system, running fsck is recommended
MINIX-fs: mounting unchecked file system, running fsck is recommended
attempt to access beyond end of device
Process accounting resumed
loop5: rw=0, want=13402, limit=52
MINIX-fs: mounting unchecked file system, running fsck is recommended
buffer_io_error: 143 callbacks suppressed
Buffer I/O error on dev loop5, logical block 6700, async page read
attempt to access beyond end of device
loop5: rw=0, want=128050, limit=52
---
This bug 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
syzk...@googlegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.