Hello,
syzbot found the following crash on:
HEAD commit: d573e8a7 Linux 4.19.75
git tree: linux-4.19.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=115c8a41600000
kernel config:
https://syzkaller.appspot.com/x/.config?x=50b385e67c7b7cdf
dashboard link:
https://syzkaller.appspot.com/bug?extid=ff051a37ab79372ca3e6
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+ff051a...@syzkaller.appspotmail.com
EXT4-fs error: 104 callbacks suppressed
EXT4-fs error (device sda1): ext4_xattr_set_entry:1607: inode #17009: comm
syz-executor.1: corrupted xattr entries
==================================================================
EXT4-fs error (device sda1): ext4_xattr_set_entry:1607: inode #16545: comm
syz-executor.3: corrupted xattr entries
BUG: KASAN: use-after-free in memset include/linux/string.h:333 [inline]
BUG: KASAN: use-after-free in __ext4_expand_extra_isize+0x175/0x250
fs/ext4/inode.c:5907
Write of size 4064 at addr ffff8880794bf0a0 by task syz-executor.5/7590
CPU: 0 PID: 7590 Comm: syz-executor.5 Not tainted 4.19.75 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report mm/kasan/report.c:412 [inline]
kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x123/0x190 mm/kasan/kasan.c:267
memset+0x24/0x40 mm/kasan/kasan.c:285
memset include/linux/string.h:333 [inline]
__ext4_expand_extra_isize+0x175/0x250 fs/ext4/inode.c:5907
ext4_try_to_expand_extra_isize fs/ext4/inode.c:5959 [inline]
ext4_mark_inode_dirty+0x6f0/0x940 fs/ext4/inode.c:6035
ext4_unlink fs/ext4/namei.c:3074 [inline]
ext4_unlink+0xd21/0xff0 fs/ext4/namei.c:3014
vfs_unlink+0x2d3/0x500 fs/namei.c:3999
do_unlinkat+0x3f7/0x6d0 fs/namei.c:4062
__do_sys_unlink fs/namei.c:4109 [inline]
__se_sys_unlink fs/namei.c:4107 [inline]
__x64_sys_unlink+0x42/0x50 fs/namei.c:4107
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x459757
Code: 00 66 90 b8 58 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 9d ba fb ff c3
66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 57 00 00 00 0f 05 <48> 3d 01 f0 ff
ff 0f 83 7d ba fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffdd99c8258 EFLAGS: 00000246 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000459757
RDX: 00007ffdd99c8270 RSI: 00007ffdd99c8270 RDI: 00007ffdd99c8300
RBP: 0000000000000539 R08: 0000000000000000 R09: 0000000000000010
R10: 000000000000000a R11: 0000000000000246 R12: 00007ffdd99c9390
R13: 0000555555f11940 R14: 0000000000000000 R15: 00007ffdd99c9390
The buggy address belongs to the page:
page:ffffea0001e52fc0 count:2 mapcount:0 mapping:ffff8880a6fa2a98
index:0x42f
flags: 0x1fffc0000001074(referenced|dirty|lru|active|private)
raw: 01fffc0000001074 ffffea0001569b88 ffffea0001e69208 ffff8880a6fa2a98
raw: 000000000000042f ffff88808ec805e8 00000002ffffffff ffff8880583e0e40
page dumped because: kasan: bad access detected
page->mem_cgroup:ffff8880583e0e40
Memory state around the buggy address:
ffff8880794bff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880794bff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ffff8880794c0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8880794c0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880794c0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
EXT4-fs error (device sda1): ext4_xattr_ibody_get:591: inode #16485: comm
syz-executor.0: corrupted in-inode xattr
---
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.