==================================================================
BUG: KASAN: use-after-free in ext4_xattr_set_entry+0x30cb/0x30f0 fs/ext4/xattr.c:1603
Read of size 4 at addr ffff88808ba45004 by task syz-executor268/8668
CPU: 0 PID: 8668 Comm: syz-executor268 Not tainted 4.14.202-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+0x1b2/0x283 lib/dump_stack.c:58
print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351
kasan_report mm/kasan/report.c:409 [inline]
__asan_report_load4_noabort+0x68/0x70 mm/kasan/report.c:429
ext4_xattr_set_entry+0x30cb/0x30f0 fs/ext4/xattr.c:1603
ext4_xattr_ibody_set+0x73/0x280 fs/ext4/xattr.c:2242
ext4_xattr_set_handle+0x4d0/0xd20 fs/ext4/xattr.c:2398
ext4_xattr_set+0x118/0x230 fs/ext4/xattr.c:2510
__vfs_setxattr+0xdc/0x130 fs/xattr.c:150
__vfs_setxattr_noperm+0xfd/0x3d0 fs/xattr.c:181
__vfs_setxattr_locked+0x14d/0x250 fs/xattr.c:239
vfs_setxattr+0xcf/0x230 fs/xattr.c:256
setxattr+0x1a9/0x300 fs/xattr.c:523
path_setxattr+0x118/0x130 fs/xattr.c:542
SYSC_setxattr fs/xattr.c:557 [inline]
SyS_setxattr+0x36/0x50 fs/xattr.c:553
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x445ba9
RSP: 002b:00007ffeb05e9d18 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000445ba9
RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000020000100
RBP: 0000000001a18c30 R08: 0000000000000001 R09: 0000006e0000005b
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffeb05e9d90
R13: 0000000000000044 R14: 0000000000000000 R15: 0000000000000000
The buggy address belongs to the page:
page:ffffea00022e9140 count:0 mapcount:0 mapping: (null) index:0x1
flags: 0xfff00000000000()
raw: 00fff00000000000 0000000000000000 0000000000000001 00000000ffffffff
raw: ffffea00022ed960 ffffea00022ea8e0 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88808ba44f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88808ba44f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88808ba45000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88808ba45080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88808ba45100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================