==================================================================
BUG: KASAN: use-after-free in ext4_xattr_set_entry+0x2e28/0x2f00 fs/ext4/xattr.c:1602
Read of size 4 at addr ffff88819a8b41a6 by task syz-executor.2/10215
CPU: 1 PID: 10215 Comm: syz-executor.2 Not tainted 4.14.151+ #0
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0xca/0x134 lib/dump_stack.c:53
print_address_description+0x60/0x226 mm/kasan/report.c:187
__kasan_report.cold+0x1a/0x41 mm/kasan/report.c:316
ext4_xattr_set_entry+0x2e28/0x2f00 fs/ext4/xattr.c:1602
ext4_xattr_ibody_set+0x73/0x280 fs/ext4/xattr.c:2238
ext4_xattr_set_handle+0x508/0xdd0 fs/ext4/xattr.c:2394
ext4_initxattrs+0xb5/0x110 fs/ext4/xattr_security.c:43
security_inode_init_security security/security.c:493 [inline]
security_inode_init_security+0x246/0x330 security/security.c:466
__ext4_new_inode+0x336f/0x4850 fs/ext4/ialloc.c:1166
ext4_mkdir+0x2f7/0xb50 fs/ext4/namei.c:2776
vfs_mkdir2+0x3c7/0x640 fs/namei.c:3967
SYSC_mkdirat fs/namei.c:3996 [inline]
SyS_mkdirat+0x125/0x220 fs/namei.c:3980
do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x459367
RSP: 002b:00007ffd83ccf7d8 EFLAGS: 00000206 ORIG_RAX: 0000000000000053
RAX: ffffffffffffffda RBX: 000000000004835d RCX: 0000000000459367
RDX: 00007ffd83ccf824 RSI: 00000000000001ff RDI: 00007ffd83ccf820
RBP: 0000000000000141 R08: 0000000000000000 R09: 0000000000000004
R10: 0000000000000064 R11: 0000000000000206 R12: 0000000000000015
R13: 00007ffd83ccf810 R14: 0000000000048198 R15: 00007ffd83ccf820
The buggy address belongs to the page:
page:ffffea00066a2d00 count:0 mapcount:-127 mapping: (null) index:0x1
flags: 0x4000000000000000()
raw: 4000000000000000 0000000000000000 0000000000000001 00000000ffffff80
raw: ffffea0006c6b520 ffffea00070a9da0 0000000000000001 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88819a8b4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88819a8b4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88819a8b4180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88819a8b4200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88819a8b4280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================