================================================================== BUG: KASAN: slab-out-of-bounds in iov_iter_alignment+0x6a1/0x7b0 lib/iov_iter.c:1225 Read of size 4 at addr ffff88806e45bb04 by task syz-executor.4/24617 CPU: 1 PID: 24617 Comm: syz-executor.4 Not tainted 5.4.0-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+0x1fb/0x318 lib/dump_stack.c:118 print_address_description+0x75/0x5c0 mm/kasan/report.c:374 __kasan_report+0x14b/0x1c0 mm/kasan/report.c:506 kasan_report+0x26/0x50 mm/kasan/common.c:634 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 iov_iter_alignment+0x6a1/0x7b0 lib/iov_iter.c:1225 iomap_dio_bio_actor+0x1a7/0x11e0 fs/iomap/direct-io.c:203 iomap_dio_actor+0x2b4/0x4a0 fs/iomap/direct-io.c:375 iomap_apply+0x370/0x490 fs/iomap/apply.c:80 iomap_dio_rw+0x8ad/0x1010 fs/iomap/direct-io.c:493 ext4_dio_write_iter fs/ext4/file.c:438 [inline] ext4_file_write_iter+0x15a4/0x1f50 fs/ext4/file.c:545 do_iter_readv_writev+0x651/0x8e0 include/linux/fs.h:1889 do_iter_write+0x180/0x590 fs/read_write.c:970 vfs_iter_write+0x7c/0xa0 fs/read_write.c:983 iter_file_splice_write+0x703/0xe40 fs/splice.c:758 do_splice_from fs/splice.c:861 [inline] direct_splice_actor+0xf7/0x130 fs/splice.c:1035 splice_direct_to_actor+0x4d2/0xb90 fs/splice.c:990 do_splice_direct+0x200/0x330 fs/splice.c:1078 do_sendfile+0x7e4/0xfd0 fs/read_write.c:1464 __do_sys_sendfile64 fs/read_write.c:1525 [inline] __se_sys_sendfile64 fs/read_write.c:1511 [inline] __x64_sys_sendfile64+0x176/0x1b0 fs/read_write.c:1511 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45a679 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f9ccbfebc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000045a679 RDX: 0000000000000000 RSI: 000000000000000c RDI: 000000000000000b RBP: 000000000075c118 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000010000 R11: 0000000000000246 R12: 00007f9ccbfec6d4 R13: 00000000004c8652 R14: 00000000004df368 R15: 00000000ffffffff Allocated by task 24617: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc+0x11c/0x1b0 mm/kasan/common.c:510 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524 __do_kmalloc mm/slab.c:3655 [inline] __kmalloc+0x254/0x340 mm/slab.c:3664 kmalloc_array+0x32/0x60 include/linux/slab.h:618 kcalloc include/linux/slab.h:629 [inline] iter_file_splice_write+0x15f/0xe40 fs/splice.c:702 do_splice_from fs/splice.c:861 [inline] direct_splice_actor+0xf7/0x130 fs/splice.c:1035 splice_direct_to_actor+0x4d2/0xb90 fs/splice.c:990 do_splice_direct+0x200/0x330 fs/splice.c:1078 do_sendfile+0x7e4/0xfd0 fs/read_write.c:1464 __do_sys_sendfile64 fs/read_write.c:1525 [inline] __se_sys_sendfile64 fs/read_write.c:1511 [inline] __x64_sys_sendfile64+0x176/0x1b0 fs/read_write.c:1511 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4174: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x12a/0x1e0 mm/kasan/common.c:471 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __cache_free mm/slab.c:3425 [inline] kfree+0x115/0x200 mm/slab.c:3756 smk_fetch security/smack/smack_lsm.c:302 [inline] smack_d_instantiate+0xb49/0xd70 security/smack/smack_lsm.c:3459 security_d_instantiate+0xa5/0x100 security/security.c:1874 d_instantiate+0x55/0x90 fs/dcache.c:1952 shmem_symlink+0x619/0x6f0 mm/shmem.c:3143 vfs_symlink+0x36f/0x4f0 fs/namei.c:4123 do_symlinkat+0x187/0x3f0 fs/namei.c:4150 __do_sys_symlink fs/namei.c:4169 [inline] __se_sys_symlink fs/namei.c:4167 [inline] __x64_sys_symlink+0x60/0x70 fs/namei.c:4167 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88806e45ba00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 4 bytes to the right of 256-byte region [ffff88806e45ba00, ffff88806e45bb00) The buggy address belongs to the page: page:ffffea0001b916c0 refcount:1 mapcount:0 mapping:ffff8880aa4008c0 index:0xffff88806e45be00 raw: 00fffe0000000200 ffffea0001bfc748 ffffea00023c9548 ffff8880aa4008c0 raw: ffff88806e45be00 ffff88806e45b000 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88806e45ba00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806e45ba80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806e45bb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88806e45bb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806e45bc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================