================================================================== BUG: KASAN: slab-out-of-bounds in get_node_id fs/fuse/fuse_i.h:874 [inline] BUG: KASAN: slab-out-of-bounds in fuse_inode_eq+0x54/0x80 fs/fuse/inode.c:295 Read of size 8 at addr ffff888132258ad8 by task syz-executor.5/5402 CPU: 1 PID: 5402 Comm: syz-executor.5 Not tainted 5.10.102-syzkaller-00166-gcbfab5c59cf6 #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_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x8d/0x3d0 mm/kasan/report.c:233 __kasan_report+0x142/0x220 mm/kasan/report.c:419 kasan_report+0x51/0x70 mm/kasan/report.c:436 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309 get_node_id fs/fuse/fuse_i.h:874 [inline] fuse_inode_eq+0x54/0x80 fs/fuse/inode.c:295 find_inode+0x19c/0x4c0 fs/inode.c:827 ilookup5_nowait fs/inode.c:1337 [inline] ilookup5+0x90/0x1a0 fs/inode.c:1366 iget5_locked+0x36/0x3c0 fs/inode.c:1147 fuse_iget+0x29a/0x7d0 fs/fuse/inode.c:336 fuse_get_root_inode fs/fuse/inode.c:766 [inline] fuse_fill_super_common+0x9e9/0xf90 fs/fuse/inode.c:1404 fuse_fill_super+0x280/0x3f0 fs/fuse/inode.c:1480 vfs_get_super fs/super.c:1191 [inline] get_tree_nodev+0xb2/0x160 fs/super.c:1221 fuse_get_tree+0x8f/0xd0 fs/fuse/inode.c:1514 vfs_get_tree+0x89/0x270 fs/super.c:1549 do_new_mount fs/namespace.c:2899 [inline] path_mount+0x1975/0x2ab0 fs/namespace.c:3229 do_mount fs/namespace.c:3242 [inline] __do_sys_mount fs/namespace.c:3450 [inline] __se_sys_mount+0x2f7/0x3b0 fs/namespace.c:3427 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3427 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f608e610059 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f608d786168 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f608e722f60 RCX: 00007f608e610059 RDX: 0000000020002100 RSI: 00000000200042c0 RDI: 0000000000000000 RBP: 00007f608e66a08d R08: 0000000020004300 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff7a11a14f R14: 00007f608d786300 R15: 0000000000022000 Allocated by task 3045: 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:428 [inline] ____kasan_kmalloc+0xdc/0x110 mm/kasan/common.c:507 __kasan_kmalloc+0x9/0x10 mm/kasan/common.c:516 kasan_kmalloc include/linux/kasan.h:269 [inline] kmem_cache_alloc_trace+0x210/0x3a0 mm/slub.c:2981 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] alloc_inode+0x47/0x70 fs/incfs/vfs.c:1550 alloc_inode fs/inode.c:234 [inline] iget5_locked+0xae/0x3c0 fs/inode.c:1150 fetch_regular_inode+0x22f/0x300 fs/incfs/vfs.c:377 incfs_mount_fs+0x532/0x950 fs/incfs/vfs.c:1841 legacy_get_tree+0xf0/0x190 fs/fs_context.c:592 vfs_get_tree+0x89/0x270 fs/super.c:1549 do_new_mount fs/namespace.c:2899 [inline] path_mount+0x1975/0x2ab0 fs/namespace.c:3229 do_mount fs/namespace.c:3242 [inline] __do_sys_mount fs/namespace.c:3450 [inline] __se_sys_mount+0x2f7/0x3b0 fs/namespace.c:3427 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3427 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff888132258800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 728 bytes inside of 1024-byte region [ffff888132258800, ffff888132258c00) The buggy address belongs to the page: page:ffffea0004c89600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x132258 head:ffffea0004c89600 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 dead000000000100 dead000000000122 ffff888100042f00 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 2232, ts 57851795903, free_ts 57534612404 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2385 [inline] prep_new_page mm/page_alloc.c:2391 [inline] get_page_from_freelist+0xa74/0xa90 mm/page_alloc.c:4063 __alloc_pages_nodemask+0x3c8/0x820 mm/page_alloc.c:5107 alloc_slab_page mm/slub.c:1813 [inline] allocate_slab+0x6b/0x350 mm/slub.c:1815 new_slab mm/slub.c:1876 [inline] new_slab_objects mm/slub.c:2635 [inline] ___slab_alloc+0x143/0x2f0 mm/slub.c:2798 __slab_alloc mm/slub.c:2838 [inline] slab_alloc_node mm/slub.c:2920 [inline] slab_alloc mm/slub.c:2962 [inline] __kmalloc_track_caller+0x299/0x3b0 mm/slub.c:4543 __kmalloc_reserve net/core/skbuff.c:143 [inline] __alloc_skb+0xb7/0x580 net/core/skbuff.c:211 alloc_skb_fclone include/linux/skbuff.h:1151 [inline] sk_stream_alloc_skb+0x1e9/0xb50 net/ipv4/tcp.c:890 tcp_sendmsg_locked+0xcda/0x4290 net/ipv4/tcp.c:1298 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1450 inet6_sendmsg+0xa1/0xc0 net/ipv6/af_inet6.c:640 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] __sys_sendto+0x541/0x700 net/socket.c:1982 __do_sys_sendto net/socket.c:1994 [inline] __se_sys_sendto net/socket.c:1990 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:1990 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1331 [inline] __free_pages_ok+0xbe7/0xc20 mm/page_alloc.c:1611 free_compound_page+0x72/0x90 mm/page_alloc.c:716 destroy_compound_page include/linux/mm.h:957 [inline] __put_compound_page mm/swap.c:115 [inline] __put_page+0x114/0x150 mm/swap.c:131 put_page include/linux/mm.h:1253 [inline] __skb_frag_unref include/linux/skbuff.h:3042 [inline] skb_release_data+0x20d/0x750 net/core/skbuff.c:619 skb_release_all net/core/skbuff.c:680 [inline] __kfree_skb+0x59/0x1c0 net/core/skbuff.c:694 sk_wmem_free_skb+0x126/0x690 include/net/sock.h:1560 tcp_write_queue_purge+0x145/0x410 net/ipv4/tcp.c:2696 tcp_v4_destroy_sock+0x106/0x370 net/ipv4/tcp_ipv4.c:2224 tcp_v6_destroy_sock+0x15/0x20 net/ipv6/tcp_ipv6.c:1939 inet_csk_destroy_sock+0x15b/0x3c0 net/ipv4/inet_connection_sock.c:887 tcp_close+0xdd4/0x1140 net/ipv4/tcp.c:2651 inet_release+0x17e/0x210 net/ipv4/af_inet.c:431 inet6_release+0x57/0x70 net/ipv6/af_inet6.c:477 __sock_release net/socket.c:597 [inline] sock_close+0xdb/0x260 net/socket.c:1267 __fput+0x348/0x7d0 fs/file_table.c:281 ____fput+0x15/0x20 fs/file_table.c:314 Memory state around the buggy address: ffff888132258980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888132258a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888132258a80: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc ^ ffff888132258b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888132258b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================