================================================================== BUG: KASAN: slab-out-of-bounds in iov_iter_alignment+0x6a1/0x7b0 lib/iov_iter.c:1225 Read of size 4 at addr ffff88805928b544 by task syz-executor.1/31082 CPU: 1 PID: 31082 Comm: syz-executor.1 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:1896 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:00007f033cec7c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000045a679 RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 00008400fffffff6 R11: 0000000000000246 R12: 00007f033cec86d4 R13: 00000000004c8d9f R14: 00000000004e0670 R15: 00000000ffffffff Allocated by task 31082: 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 4087: 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+0x7bb/0xd70 security/smack/smack_lsm.c:3416 security_d_instantiate+0xa5/0x100 security/security.c:1874 d_instantiate+0x55/0x90 fs/dcache.c:1952 shmem_mknod+0x178/0x1c0 mm/shmem.c:2893 shmem_create+0x2b/0x40 mm/shmem.c:2939 lookup_open fs/namei.c:3228 [inline] do_last fs/namei.c:3318 [inline] path_openat+0x2236/0x44a0 fs/namei.c:3529 do_filp_open+0x192/0x3d0 fs/namei.c:3559 do_sys_open+0x29f/0x560 fs/open.c:1097 __do_sys_open fs/open.c:1115 [inline] __se_sys_open fs/open.c:1110 [inline] __x64_sys_open+0x87/0x90 fs/open.c:1110 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 ffff88805928b400 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 68 bytes to the right of 256-byte region [ffff88805928b400, ffff88805928b500) The buggy address belongs to the page: page:ffffea000164a2c0 refcount:1 mapcount:0 mapping:ffff8880aa4008c0 index:0x0 raw: 00fffe0000000200 ffffea0002371008 ffffea00026eebc8 ffff8880aa4008c0 raw: 0000000000000000 ffff88805928b000 0000000100000008 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88805928b400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805928b480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805928b500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88805928b580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805928b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================