Hello,
syzbot hit the following crash on upstream commit
c2a9838452a4d71f76103c18c926468a9ea05713 (Fri Mar 30 05:27:12 2018 +0000)
Merge tag 'for-4.16/dm-fixes-4' of
git://
git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
syzbot dashboard link:
https://syzkaller.appspot.com/bug?extid=b65b4d0763d38c066a79
Unfortunately, I don't have any reproducer for this crash yet.
Raw console output:
https://syzkaller.appspot.com/x/log.txt?id=6695479739940864
Kernel config:
https://syzkaller.appspot.com/x/.config?id=-8440362230543204781
compiler: gcc (GCC) 7.1.1 20170620
CC: [
adilger...@dilger.ca linux...@vger.kernel.org
linux-...@vger.kernel.org ty...@mit.edu]
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by:
syzbot+b65b4d...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.
==================================================================
BUG: KASAN: use-after-free in rb_left_deepest_node lib/rbtree.c:641 [inline]
BUG: KASAN: use-after-free in rb_next_postorder+0x104/0x140 lib/rbtree.c:661
Read of size 8 at addr ffff8801d5194298 by task syz-executor6/4496
CPU: 0 PID: 4496 Comm: syz-executor6 Not tainted 4.16.0-rc7+ #6
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+0x194/0x24d lib/dump_stack.c:53
print_address_description+0x73/0x250 mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report+0x23c/0x360 mm/kasan/report.c:412
__asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433
rb_left_deepest_node lib/rbtree.c:641 [inline]
rb_next_postorder+0x104/0x140 lib/rbtree.c:661
free_rb_tree_fname+0x4b/0xe0 fs/ext4/dir.c:400
ext4_htree_free_dir_info fs/ext4/dir.c:426 [inline]
ext4_release_dir+0x44/0x60 fs/ext4/dir.c:624
__fput+0x327/0x7e0 fs/file_table.c:209
____fput+0x15/0x20 fs/file_table.c:243
task_work_run+0x199/0x270 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x9bb/0x1ad0 kernel/exit.c:865
do_group_exit+0x149/0x400 kernel/exit.c:968
SYSC_exit_group kernel/exit.c:979 [inline]
SyS_exit_group+0x1d/0x20 kernel/exit.c:977
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4548b9
RSP: 002b:00007fffde1885c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00000000004548b9
RDX: 000000000040e930 RSI: 0000000000a44bd0 RDI: 0000000000000045
RBP: 00000000004b93e9 R08: 000000000000000b R09: 0000000000000000
R10: 00000000026ce940 R11: 0000000000000246 R12: 00000000026cf940
R13: 0000000000000000 R14: 000000000000001a R15: 0000000000028e25
Allocated by task 4496:
save_stack+0x43/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552
__do_kmalloc mm/slab.c:3706 [inline]
__kmalloc+0x162/0x760 mm/slab.c:3715
kmalloc include/linux/slab.h:517 [inline]
kzalloc include/linux/slab.h:701 [inline]
ext4_htree_store_dirent+0x8b/0x580 fs/ext4/dir.c:452
htree_dirblock_to_tree+0x4e8/0xa00 fs/ext4/namei.c:1020
ext4_htree_fill_tree+0x2bb/0xcb0 fs/ext4/namei.c:1097
ext4_dx_readdir fs/ext4/dir.c:576 [inline]
ext4_readdir+0x206a/0x3600 fs/ext4/dir.c:123
iterate_dir+0x1ca/0x530 fs/readdir.c:51
SYSC_getdents fs/readdir.c:231 [inline]
SyS_getdents+0x225/0x450 fs/readdir.c:212
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
Freed by task 4496:
save_stack+0x43/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
__kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520
kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527
__cache_free mm/slab.c:3486 [inline]
kfree+0xd9/0x260 mm/slab.c:3801
free_rb_tree_fname+0x85/0xe0 fs/ext4/dir.c:404
ext4_htree_free_dir_info fs/ext4/dir.c:426 [inline]
ext4_release_dir+0x44/0x60 fs/ext4/dir.c:624
__fput+0x327/0x7e0 fs/file_table.c:209
____fput+0x15/0x20 fs/file_table.c:243
task_work_run+0x199/0x270 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x9bb/0x1ad0 kernel/exit.c:865
do_group_exit+0x149/0x400 kernel/exit.c:968
SYSC_exit_group kernel/exit.c:979 [inline]
SyS_exit_group+0x1d/0x20 kernel/exit.c:977
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
The buggy address belongs to the object at ffff8801d5194280
which belongs to the cache kmalloc-64 of size 64
The buggy address is located 24 bytes inside of
64-byte region [ffff8801d5194280, ffff8801d51942c0)
The buggy address belongs to the page:
page:ffffea0007546500 count:1 mapcount:0 mapping:ffff8801d5194000 index:0x0
flags: 0x2fffc0000000100(slab)
raw: 02fffc0000000100 ffff8801d5194000 0000000000000000 0000000100000020
raw: ffffea00075face0 ffffea0007478b20 ffff8801dac00340 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8801d5194180: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff8801d5194200: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
> ffff8801d5194280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
^
ffff8801d5194300: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff8801d5194380: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc
==================================================================
---
This bug is generated by a dumb bot. It may contain errors.
See
https://goo.gl/tpsmEJ for details.
Direct all questions to
syzk...@googlegroups.com.
syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
To upstream this report, please reply with:
#syz upstream