EXT4-fs (loop0): mounted filesystem without journal. Opts: ,errors=continue ================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:377 [inline] BUG: KASAN: use-after-free in ext4_write_inline_data+0x300/0x3d0 fs/ext4/inline.c:245 Write of size 70 at addr ffff8880b04b0016 by task syz-executor016/8128 CPU: 1 PID: 8128 Comm: syz-executor016 Not tainted 4.19.193-syzkaller #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+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report+0x8f/0xa0 mm/kasan/report.c:412 memcpy+0x35/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:377 [inline] ext4_write_inline_data+0x300/0x3d0 fs/ext4/inline.c:245 ext4_write_inline_data_end+0x220/0x640 fs/ext4/inline.c:754 ext4_write_end+0x1de/0xec0 fs/ext4/inode.c:1423 ext4_da_write_end+0x860/0xa70 fs/ext4/inode.c:3170 generic_perform_write+0x2ae/0x4d0 mm/filemap.c:3181 __generic_file_write_iter+0x24b/0x610 mm/filemap.c:3295 ext4_file_write_iter+0x2fe/0xf20 fs/ext4/file.c:272 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x51b/0x770 fs/read_write.c:487 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x44a9f9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9f195b9208 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00000000004cc428 RCX: 000000000044a9f9 RDX: 0000000000000082 RSI: 00000000200000c0 RDI: 0000000000000008 RBP: 00000000004cc420 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004cc42c R13: 00007ffee825f65f R14: 00007f9f195b9300 R15: 0000000000022000 Allocated by task 28: kmem_cache_alloc+0x122/0x370 mm/slab.c:3559 alloc_pid+0x53/0x8f0 kernel/pid.c:168 copy_process.part.0+0x3bc0/0x8260 kernel/fork.c:1926 copy_process kernel/fork.c:1709 [inline] _do_fork+0x22f/0xf30 kernel/fork.c:2218 kernel_thread+0x2f/0x40 kernel/fork.c:2277 call_usermodehelper_exec_work kernel/umh.c:199 [inline] call_usermodehelper_exec_work+0x16d/0x260 kernel/umh.c:185 process_one_work+0x864/0x1570 kernel/workqueue.c:2152 worker_thread+0x64c/0x1130 kernel/workqueue.c:2295 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Freed by task 9: __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x7f/0x260 mm/slab.c:3765 put_pid.part.0+0x109/0x150 kernel/pid.c:111 put_pid kernel/pid.c:105 [inline] delayed_put_pid+0x1c/0x30 kernel/pid.c:120 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0x8ff/0x18b0 kernel/rcu/tree.c:2881 __do_softirq+0x265/0x980 kernel/softirq.c:292 The buggy address belongs to the object at ffff8880b04b0000 which belongs to the cache pid of size 72 The buggy address is located 22 bytes inside of 72-byte region [ffff8880b04b0000, ffff8880b04b0048) The buggy address belongs to the page: page:ffffea0002c12c00 count:1 mapcount:0 mapping:ffff88823b8334c0 index:0xffff8880b04b0f80 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002cbdac8 ffffea0002b77c88 ffff88823b8334c0 raw: ffff8880b04b0f80 ffff8880b04b0000 000000010000000e 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b04aff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880b04aff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880b04b0000: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc ^ ffff8880b04b0080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc ffff8880b04b0100: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc ==================================================================