gfs2: fsid=syz:syz.0: H: s:SH f:H e:0 p:6165 [syz.0.195] __gfs2_lookup+0xac/0x2b0 fs/gfs2/inode.c:996 ================================================================== BUG: KASAN: vmalloc-out-of-bounds in gfs2_dump_glock+0x14af/0x1a70 fs/gfs2/glock.c:2350 Read of size 8 at addr ffffc9000242f8c0 by task syz.0.195/6178 CPU: 0 UID: 0 PID: 6178 Comm: syz.0.195 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 gfs2_dump_glock+0x14af/0x1a70 fs/gfs2/glock.c:2350 gfs2_consist_inode_i+0xf5/0x110 fs/gfs2/util.c:345 gfs2_dirent_scan+0x54d/0x690 fs/gfs2/dir.c:-1 gfs2_dirent_search+0x358/0x8e0 fs/gfs2/dir.c:854 gfs2_dir_search+0x4c/0x220 fs/gfs2/dir.c:1649 gfs2_lookupi+0x45b/0x640 fs/gfs2/inode.c:354 __gfs2_lookup+0xac/0x2b0 fs/gfs2/inode.c:996 __lookup_slow+0x1fb/0x2f0 fs/namei.c:1919 lookup_slow+0x53/0x70 fs/namei.c:1936 walk_component fs/namei.c:2282 [inline] link_path_walk+0xd2a/0x1910 fs/namei.c:2656 path_lookupat+0xe4/0x8c0 fs/namei.c:2812 do_o_path+0x9f/0x210 fs/namei.c:4830 path_openat+0x309a/0x3830 fs/namei.c:4852 do_file_open+0x23e/0x4a0 fs/namei.c:4888 do_sys_openat2+0x115/0x200 fs/open.c:1368 do_sys_open fs/open.c:1374 [inline] __do_sys_openat fs/open.c:1390 [inline] __se_sys_openat fs/open.c:1385 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1385 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe91079ce59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe9116ef028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fe910a16090 RCX: 00007fe91079ce59 RDX: 0000000000200002 RSI: 00002000000000c0 RDI: ffffffffffffff9c RBP: 00007fe910832e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fe910a16128 R14: 00007fe910a16090 R15: 00007ffdc9f53e38 The buggy address belongs to a 8-page vmalloc region starting at 0xffffc90002428000 allocated at copy_process+0x81b/0x42e0 kernel/fork.c:2110 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x55fe pfn:0x55c9f memcg:ffff8880350b0682 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 00000000000055fe 0000000000000000 00000001ffffffff ffff8880350b0682 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x29c2(GFP_NOWAIT|__GFP_HIGHMEM|__GFP_IO|__GFP_FS|__GFP_ZERO), pid 6164, tgid 6164 (syz.0.195), ts 388929961593, free_ts 388907668295 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946 __alloc_pages_slowpath+0x383/0xcc0 mm/page_alloc.c:4821 __alloc_frozen_pages_noprof+0x31f/0x380 mm/page_alloc.c:5317 alloc_pages_mpol+0x212/0x380 mm/mempolicy.c:2490 alloc_frozen_pages_noprof mm/mempolicy.c:2561 [inline] alloc_pages_noprof+0xac/0x2a0 mm/mempolicy.c:2581 vm_area_alloc_pages mm/vmalloc.c:3667 [inline] __vmalloc_area_node mm/vmalloc.c:3892 [inline] __vmalloc_node_range_noprof+0x795/0x1730 mm/vmalloc.c:4082 __vmalloc_node_noprof+0xc2/0x100 mm/vmalloc.c:4143 alloc_thread_stack_node kernel/fork.c:359 [inline] dup_task_struct+0x28e/0x850 kernel/fork.c:929 copy_process+0x81b/0x42e0 kernel/fork.c:2110 kernel_clone+0x2d7/0x940 kernel/fork.c:2746 __do_sys_clone3 kernel/fork.c:3048 [inline] __se_sys_clone3+0x33c/0x360 kernel/fork.c:3027 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5322 tgid 5322 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0xc1e/0xd10 mm/page_alloc.c:2950 __folio_put+0x4b3/0x590 mm/swap.c:112 folio_put include/linux/mm.h:2124 [inline] put_page include/linux/mm.h:2193 [inline] put_netmem include/net/netmem.h:394 [inline] skb_page_unref include/linux/skbuff_ref.h:43 [inline] __skb_frag_unref include/linux/skbuff_ref.h:56 [inline] skb_release_data+0x573/0xab0 net/core/skbuff.c:1110 skb_release_all net/core/skbuff.c:1191 [inline] __kfree_skb+0x5d/0x210 net/core/skbuff.c:1205 kfree_skb_napi_cache net/core/skbuff.c:7281 [inline] skb_attempt_defer_free+0x533/0x7c0 net/core/skbuff.c:7319 tcp_eat_recv_skb net/ipv4/tcp.c:1621 [inline] tcp_recvmsg_locked+0x22ef/0x3800 net/ipv4/tcp.c:2899 tcp_recvmsg+0x203/0x7f0 net/ipv4/tcp.c:2944 sock_recvmsg_nosec net/socket.c:1128 [inline] sock_recvmsg+0x166/0x1e0 net/socket.c:1148 sock_read_iter+0x22a/0x2f0 net/socket.c:1217 new_sync_read fs/read_write.c:493 [inline] vfs_read+0x595/0xa80 fs/read_write.c:574 ksys_read+0x150/0x270 fs/read_write.c:716 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc9000242f780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000242f800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000242f880: 00 00 00 00 f1 f1 f1 f1 f8 f8 f8 f2 f2 f2 f2 f2 ^ ffffc9000242f900: 00 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000242f980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================