gfs2: fsid=syz:syz.0: first mount done, others may mount ================================================================== BUG: KASAN: slab-out-of-bounds in should_fault_in_pages fs/gfs2/file.c:784 [inline] BUG: KASAN: slab-out-of-bounds in gfs2_file_direct_write fs/gfs2/file.c:923 [inline] BUG: KASAN: slab-out-of-bounds in gfs2_file_write_iter+0x872/0xf10 fs/gfs2/file.c:1139 Read of size 8 at addr ffff88808b737f00 by task syz-executor.0/9960 CPU: 1 PID: 9960 Comm: syz-executor.0 Not tainted 5.15.131-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 should_fault_in_pages fs/gfs2/file.c:784 [inline] gfs2_file_direct_write fs/gfs2/file.c:923 [inline] gfs2_file_write_iter+0x872/0xf10 fs/gfs2/file.c:1139 do_iter_readv_writev+0x594/0x7a0 do_iter_write+0x1ea/0x760 fs/read_write.c:855 iter_file_splice_write+0x806/0xfa0 fs/splice.c:689 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0xe3/0x1c0 fs/splice.c:936 splice_direct_to_actor+0x500/0xc10 fs/splice.c:891 do_splice_direct+0x285/0x3d0 fs/splice.c:979 do_sendfile+0x625/0xff0 fs/read_write.c:1249 __do_sys_sendfile64 fs/read_write.c:1317 [inline] __se_sys_sendfile64+0x178/0x1e0 fs/read_write.c:1303 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f266bb78ae9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 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 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f266a0fa0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f266bc97f80 RCX: 00007f266bb78ae9 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000005 RBP: 00007f266bbc447a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000008800000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f266bc97f80 R15: 00007ffc4b4fdc48 Allocated by task 9960: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:264 [inline] __kmalloc+0x168/0x300 mm/slub.c:4407 kmalloc_array include/linux/slab.h:631 [inline] kcalloc include/linux/slab.h:660 [inline] iter_file_splice_write+0x27b/0xfa0 fs/splice.c:628 do_splice_from fs/splice.c:767 [inline] direct_splice_actor+0xe3/0x1c0 fs/splice.c:936 splice_direct_to_actor+0x500/0xc10 fs/splice.c:891 do_splice_direct+0x285/0x3d0 fs/splice.c:979 do_sendfile+0x625/0xff0 fs/read_write.c:1249 __do_sys_sendfile64 fs/read_write.c:1317 [inline] __se_sys_sendfile64+0x178/0x1e0 fs/read_write.c:1303 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff88808b737e00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes to the right of 256-byte region [ffff88808b737e00, ffff88808b737f00) The buggy address belongs to the page: page:ffffea00022dcd80 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88808b736400 pfn:0x8b736 head:ffffea00022dcd80 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0000793980 0000000700000007 ffff888011c41b40 raw: ffff88808b736400 000000008010000e 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x1d2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 9057, ts 447551338222, free_ts 442907209596 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5421 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xbb/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc+0x1c9/0x300 mm/slub.c:4403 kmalloc include/linux/slab.h:596 [inline] skcipher_request_alloc include/crypto/skcipher.h:498 [inline] fscrypt_crypt_block+0x1f7/0x7f0 fs/crypto/crypto.c:113 fscrypt_encrypt_pagecache_blocks+0x2f1/0x570 fs/crypto/crypto.c:190 ext4_bio_write_page+0xe45/0x1cc0 fs/ext4/page-io.c:524 mpage_submit_page+0x18d/0x230 fs/ext4/inode.c:2101 mpage_process_page_bufs+0x6c8/0x8b0 fs/ext4/inode.c:2215 mpage_prepare_extent_to_map+0xc9d/0x1150 fs/ext4/inode.c:2643 ext4_writepages+0x1273/0x3d10 fs/ext4/inode.c:2815 do_writepages+0x481/0x730 mm/page-writeback.c:2364 filemap_fdatawrite_wbc+0x1d6/0x230 mm/filemap.c:400 __filemap_fdatawrite_range mm/filemap.c:433 [inline] file_write_and_wait_range+0x1cb/0x2b0 mm/filemap.c:810 ext4_sync_file+0x225/0xb90 fs/ext4/fsync.c:151 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396 kasan_depopulate_vmalloc_pte+0x66/0x80 mm/kasan/shadow.c:375 apply_to_pte_range mm/memory.c:2545 [inline] apply_to_pmd_range mm/memory.c:2589 [inline] apply_to_pud_range mm/memory.c:2625 [inline] apply_to_p4d_range mm/memory.c:2661 [inline] __apply_to_page_range+0x9bf/0xcc0 mm/memory.c:2695 kasan_release_vmalloc+0x96/0xb0 mm/kasan/shadow.c:485 __purge_vmap_area_lazy+0x15ae/0x1740 mm/vmalloc.c:1704 try_purge_vmap_area_lazy+0x34/0x50 mm/vmalloc.c:1723 free_unmap_vmap_area mm/vmalloc.c:1778 [inline] remove_vm_area+0x1ae/0x1d0 mm/vmalloc.c:2517 vm_remove_mappings mm/vmalloc.c:2546 [inline] __vunmap+0x325/0xa20 mm/vmalloc.c:2611 copy_entries_to_user net/ipv4/netfilter/ip_tables.c:867 [inline] get_entries net/ipv4/netfilter/ip_tables.c:1023 [inline] do_ipt_get_ctl+0x11d4/0x1880 net/ipv4/netfilter/ip_tables.c:1661 nf_getsockopt+0x28e/0x2b0 net/netfilter/nf_sockopt.c:116 ip_getsockopt+0x136c/0x1ec0 net/ipv4/ip_sockglue.c:1787 tcp_getsockopt+0x26d/0x6c20 net/ipv4/tcp.c:4300 __sys_getsockopt+0x2a6/0x550 net/socket.c:2223 __do_sys_getsockopt net/socket.c:2238 [inline] __se_sys_getsockopt net/socket.c:2235 [inline] __x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2235 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 Memory state around the buggy address: ffff88808b737e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808b737e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808b737f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808b737f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808b738000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================