================================================================== 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 ffff88810c56aad8 by task syz-executor.0/972 CPU: 1 PID: 972 Comm: syz-executor.0 Not tainted 5.10.101-syzkaller-00961-gc194212a0332 #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:0x7f360a8ea059 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:00007f3609a3f168 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f360a9fd030 RCX: 00007f360a8ea059 RDX: 0000000020002100 RSI: 00000000200020c0 RDI: 0000000000000000 RBP: 00007f360a94408d R08: 0000000020000300 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe9a0e661f R14: 00007f3609a3f300 R15: 0000000000022000 Allocated by task 29581: 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/0x8f0 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 Last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xd3/0xf0 mm/kasan/generic.c:345 insert_work+0x56/0x330 kernel/workqueue.c:1348 __queue_work+0x951/0xda0 kernel/workqueue.c:1514 queue_work_on+0xef/0x150 kernel/workqueue.c:1541 queue_work include/linux/workqueue.h:513 [inline] schedule_work include/linux/workqueue.h:574 [inline] bpf_prog_free+0x139/0x150 kernel/bpf/core.c:2217 __bpf_prog_put_rcu+0x145/0x170 kernel/bpf/syscall.c:1747 rcu_do_batch+0x4cd/0xb40 kernel/rcu/tree.c:2485 rcu_core+0x822/0x10d0 kernel/rcu/tree.c:2722 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2735 __do_softirq+0x27e/0x598 kernel/softirq.c:305 Second to last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xd3/0xf0 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:2963 [inline] call_rcu+0x12f/0x1500 kernel/rcu/tree.c:3037 __bpf_prog_put_noref kernel/bpf/syscall.c:1760 [inline] __bpf_prog_put kernel/bpf/syscall.c:1773 [inline] bpf_prog_put+0x2b7/0x390 kernel/bpf/syscall.c:1779 bpf_link_free kernel/bpf/syscall.c:2348 [inline] bpf_link_put+0x200/0x270 kernel/bpf/syscall.c:2373 bpf_link_release+0x3b/0x40 kernel/bpf/syscall.c:2381 __fput+0x348/0x7d0 fs/file_table.c:281 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x147/0x1b0 kernel/task_work.c:154 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop kernel/entry/common.c:164 [inline] exit_to_user_mode_prepare+0xc3/0xe0 kernel/entry/common.c:191 syscall_exit_to_user_mode+0x24/0x40 kernel/entry/common.c:266 do_syscall_64+0x3d/0x70 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88810c56a800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 728 bytes inside of 1024-byte region [ffff88810c56a800, ffff88810c56ac00) The buggy address belongs to the page: page:ffffea0004315a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88810c568800 pfn:0x10c568 head:ffffea0004315a00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 ffffea0004530408 ffffea00044ac008 ffff888100042f00 raw: ffff88810c568800 0000000000100005 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 0xd2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 362, ts 51035322466, free_ts 51034620313 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 __napi_alloc_skb+0x18b/0x310 net/core/skbuff.c:521 napi_alloc_skb include/linux/skbuff.h:2877 [inline] page_to_skb+0x40/0x940 drivers/net/virtio_net.c:392 receive_mergeable+0x853/0x2b70 drivers/net/virtio_net.c:992 receive_buf+0x140/0x1ba0 drivers/net/virtio_net.c:1102 virtnet_receive drivers/net/virtio_net.c:1394 [inline] virtnet_poll+0x5c5/0x11c0 drivers/net/virtio_net.c:1499 napi_poll+0x1a3/0x650 net/core/dev.c:6832 net_rx_action+0x387/0x970 net/core/dev.c:6902 __do_softirq+0x27e/0x598 kernel/softirq.c:305 asm_call_irq_on_stack+0xf/0x20 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] do_softirq_own_stack+0x60/0x80 arch/x86/kernel/irq_64.c:77 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:3026 [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_eat_skb include/net/sock.h:2570 [inline] tcp_recvmsg+0x16b1/0x37b0 net/ipv4/tcp.c:2314 inet_recvmsg+0x157/0x500 net/ipv4/af_inet.c:852 sock_recvmsg_nosec net/socket.c:886 [inline] sock_recvmsg net/socket.c:904 [inline] sock_read_iter+0x3a7/0x4d0 net/socket.c:977 call_read_iter include/linux/fs.h:1941 [inline] new_sync_read fs/read_write.c:415 [inline] vfs_read+0x9d4/0xbe0 fs/read_write.c:496 ksys_read+0x186/0x2b0 fs/read_write.c:634 __do_sys_read fs/read_write.c:644 [inline] __se_sys_read fs/read_write.c:642 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:642 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Memory state around the buggy address: ffff88810c56a980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88810c56aa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88810c56aa80: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc ^ ffff88810c56ab00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88810c56ab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================