================================================================== BUG: KASAN: use-after-free in memset include/linux/string.h:329 [inline] BUG: KASAN: use-after-free in __ext4_expand_extra_isize.isra.13+0x108/0x1b0 fs/ext4/inode.c:5780 Write of size 65503 at addr ffff8801891a47a0 by task syz-executor4/31761 CPU: 0 PID: 31761 Comm: syz-executor4 Not tainted 4.14.75+ #18 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 print_address_description+0x60/0x22b mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.6+0x11b/0x2dd mm/kasan/report.c:409 memset+0x1f/0x40 mm/kasan/kasan.c:285 memset include/linux/string.h:329 [inline] __ext4_expand_extra_isize.isra.13+0x108/0x1b0 fs/ext4/inode.c:5780 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5832 [inline] ext4_mark_inode_dirty+0x46c/0x7e0 fs/ext4/inode.c:5908 ext4_evict_inode+0x69a/0x1520 fs/ext4/inode.c:282 evict+0x2cb/0x5f0 fs/inode.c:554 iput_final fs/inode.c:1516 [inline] iput+0x373/0x8e0 fs/inode.c:1543 dentry_unlink_inode+0x25c/0x310 fs/dcache.c:373 __dentry_kill+0x31b/0x590 fs/dcache.c:577 dentry_kill fs/dcache.c:618 [inline] dput.part.6+0x4b5/0x710 fs/dcache.c:833 kauditd_printk_skb: 207 callbacks suppressed audit: type=1400 audit(1539352543.226:8255): avc: denied { map } for pid=24915 comm="udevd" path="/etc/ld.so.cache" dev="sda1" ino=2503 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1539352543.246:8256): avc: denied { map } for pid=24915 comm="udevd" path="/lib/x86_64-linux-gnu/libgcc_s.so.1" dev="sda1" ino=2665 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1539352543.246:8257): avc: denied { map } for pid=24915 comm="udevd" path="/lib/x86_64-linux-gnu/libgcc_s.so.1" dev="sda1" ino=2665 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 EXT4-fs (sda1): EXT4-fs: inode_readahead_blks must be 0 or a power of 2 smaller than 2^31 dput+0x1b/0x30 fs/dcache.c:797 __fput+0x42c/0x6f0 fs/file_table.c:228 task_work_run+0x116/0x190 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x8f8/0x2800 kernel/exit.c:865 do_group_exit+0x100/0x2e0 kernel/exit.c:968 get_signal+0x4e5/0x1470 kernel/signal.c:2348 do_signal+0x8f/0x1660 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0x116/0x150 arch/x86/entry/common.c:159 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:267 [inline] do_syscall_64+0x35d/0x4b0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x457519 RSP: 002b:00007fd53b07acf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000072bf08 RCX: 0000000000457519 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000072bf08 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000072bf0c audit: type=1400 audit(1539352543.496:8258): avc: denied { map } for pid=20824 comm="syz-executor3" path=2F6D656D66643A776CD0C6D26F6D696D655F747970652D7472757374651D202864656C6574656429 dev="tmpfs" ino=118130 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:tmpfs_t:s0 tclass=file permissive=1 audit: type=1400 audit(1539352543.526:8259): avc: denied { map } for pid=20824 comm="syz-executor3" path=2F6D656D66643A776CD0C6D26F6D696D655F747970652D7472757374651D202864656C6574656429 dev="tmpfs" ino=118133 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:tmpfs_t:s0 tclass=file permissive=1 R13: 00007ffc0730ff3f R14: 00007fd53b07b9c0 R15: 0000000000000000 The buggy address belongs to the page: page:ffffea0006246900 count:2 mapcount:0 mapping:ffff8801d9aa8950 index:0x438 flags: 0x4000000000001074(referenced|dirty|lru|active|private) raw: 4000000000001074 ffff8801d9aa8950 0000000000000438 00000002ffffffff raw: ffffea00063f46e0 ffffea00063f3ee0 ffff8801933f59d8 ffff8801da81aa80 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8801da81aa80 Memory state around the buggy address: ffff8801891a5f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801891a5f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801891a6000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8801891a6080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8801891a6100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================