gfs2: fsid=syz:syz.0: G: s:SH n:2/925 f:qob t:SH d:EX/0 a:0 v:0 r:3 m:20 p:1 gfs2: fsid=syz:syz.0: H: s:SH f:H e:0 p:11878 [syz-executor.2] __gfs2_lookup+0xa4/0x270 fs/gfs2/inode.c:896 gfs2: fsid=syz:syz.0: H: s:SH f:AH e:0 p:11897 [syz-executor.2] do_inode_permission fs/namei.c:462 [inline] gfs2: fsid=syz:syz.0: H: s:SH f:AH e:0 p:11897 [syz-executor.2] inode_permission+0x233/0x460 fs/namei.c:529 ================================================================== BUG: KASAN: stack-out-of-bounds in gfs2_dump_glock+0x15b1/0x1ba0 Read of size 8 at addr ffffc9000320f7e0 by task syz-executor.2/11878 CPU: 1 PID: 11878 Comm: syz-executor.2 Not tainted 6.7.0-rc8-syzkaller-00055-g5eff55d725a4 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x142/0x170 mm/kasan/report.c:588 gfs2_dump_glock+0x15b1/0x1ba0 gfs2_consist_inode_i+0xf5/0x110 fs/gfs2/util.c:456 gfs2_dirent_scan+0x512/0x640 fs/gfs2/dir.c:602 gfs2_dirent_search+0x30e/0x8c0 fs/gfs2/dir.c:850 gfs2_dir_search+0xb2/0x2f0 fs/gfs2/dir.c:1650 gfs2_lookupi+0x460/0x5d0 fs/gfs2/inode.c:340 __gfs2_lookup+0xa4/0x270 fs/gfs2/inode.c:896 lookup_one_qstr_excl+0x11b/0x250 fs/namei.c:1609 filename_create+0x297/0x530 fs/namei.c:3876 do_mknodat+0x18b/0x5b0 fs/namei.c:4021 __do_sys_mknodat fs/namei.c:4062 [inline] __se_sys_mknodat fs/namei.c:4059 [inline] __x64_sys_mknodat+0xa9/0xc0 fs/namei.c:4059 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f346827cce9 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:00007f3468f9a0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000103 RAX: ffffffffffffffda RBX: 00007f346839bf80 RCX: 00007f346827cce9 RDX: 0000000000000000 RSI: 0000000020000340 RDI: 0000000000000004 RBP: 00007f34682c947a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000704 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f346839bf80 R15: 00007ffea03b5008 The buggy address belongs to the virtual mapping at [ffffc90003208000, ffffc90003211000) created by: copy_process+0x5d1/0x3fb0 kernel/fork.c:2332 The buggy address belongs to the physical page: page:ffffea00007de640 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1f799 memcg:ffff888068ebda02 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff888068ebda02 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 2, tgid 2 (kthreadd), ts 522103125643, free_ts 521885326772 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0x33ea/0x3570 mm/page_alloc.c:3312 __alloc_pages+0x255/0x680 mm/page_alloc.c:4568 alloc_pages_mpol+0x3de/0x640 mm/mempolicy.c:2133 vm_area_alloc_pages mm/vmalloc.c:3063 [inline] __vmalloc_area_node mm/vmalloc.c:3139 [inline] __vmalloc_node_range+0x9a3/0x14a0 mm/vmalloc.c:3320 alloc_thread_stack_node kernel/fork.c:309 [inline] dup_task_struct+0x3e5/0x7d0 kernel/fork.c:1118 copy_process+0x5d1/0x3fb0 kernel/fork.c:2332 kernel_clone+0x222/0x840 kernel/fork.c:2907 kernel_thread+0x1bc/0x230 kernel/fork.c:2969 create_kthread kernel/kthread.c:411 [inline] kthreadd+0x60c/0x810 kernel/kthread.c:764 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x931/0xa60 mm/page_alloc.c:2347 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2487 discard_slab mm/slub.c:2116 [inline] __unfreeze_partials+0x1e0/0x220 mm/slub.c:2655 put_cpu_partial+0x17b/0x250 mm/slub.c:2731 __slab_free+0x2b6/0x390 mm/slub.c:3679 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x75/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x14b/0x160 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x23/0x70 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6c/0x3c0 mm/slab.h:763 slab_alloc_node mm/slub.c:3478 [inline] kmem_cache_alloc_node+0x1dd/0x310 mm/slub.c:3523 kmalloc_reserve+0x8a/0x260 net/core/skbuff.c:560 __alloc_skb+0x1b1/0x420 net/core/skbuff.c:651 alloc_skb_fclone include/linux/skbuff.h:1336 [inline] tcp_stream_alloc_skb+0x3d/0x310 net/ipv4/tcp.c:871 tcp_sendmsg_locked+0xd87/0x4cf0 net/ipv4/tcp.c:1153 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1340 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] sock_write_iter+0x39a/0x520 net/socket.c:1158 Memory state around the buggy address: ffffc9000320f680: 04 f2 00 f2 f2 f2 00 00 f3 f3 f3 f3 00 00 00 00 ffffc9000320f700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000320f780: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ^ ffffc9000320f800: 00 00 00 00 00 00 f2 f2 f2 f2 00 00 f3 f3 f3 f3 ffffc9000320f880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================