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 ffff8880129aab00 by task syz-executor.0/11667 CPU: 1 PID: 11667 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:0x7f4c71796ae9 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:00007f4c6fd180c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f4c718b5f80 RCX: 00007f4c71796ae9 RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000004 RBP: 00007f4c717e247a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000008800000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f4c718b5f80 R15: 00007ffd5f4c4888 Allocated by task 11667: 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 Last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:348 kvfree_call_rcu+0x118/0x8a0 kernel/rcu/tree.c:3583 drop_sysctl_table+0x317/0x460 fs/proc/proc_sysctl.c:1680 drop_sysctl_table+0x329/0x460 fs/proc/proc_sysctl.c:1683 unregister_sysctl_table+0x88/0x130 fs/proc/proc_sysctl.c:1718 neigh_sysctl_unregister+0x74/0x90 net/core/neighbour.c:3720 devinet_sysctl_unregister net/ipv4/devinet.c:2629 [inline] inetdev_destroy net/ipv4/devinet.c:324 [inline] inetdev_event+0x814/0x1490 net/ipv4/devinet.c:1598 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:1998 [inline] call_netdevice_notifiers_extack net/core/dev.c:2010 [inline] call_netdevice_notifiers net/core/dev.c:2024 [inline] unregister_netdevice_many+0xf1b/0x18f0 net/core/dev.c:11067 unregister_netdevice_queue+0x2e6/0x350 net/core/dev.c:11000 unregister_netdevice include/linux/netdevice.h:3011 [inline] bpq_free_device drivers/net/hamradio/bpqether.c:523 [inline] bpq_device_event+0x831/0x9d0 drivers/net/hamradio/bpqether.c:553 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:1998 [inline] call_netdevice_notifiers_extack net/core/dev.c:2010 [inline] call_netdevice_notifiers net/core/dev.c:2024 [inline] unregister_netdevice_many+0xf1b/0x18f0 net/core/dev.c:11067 unregister_netdevice_queue+0x2e6/0x350 net/core/dev.c:11000 unregister_netdevice include/linux/netdevice.h:3011 [inline] nsim_destroy+0x44/0x140 drivers/net/netdevsim/netdev.c:382 __nsim_dev_port_del+0x153/0x1b0 drivers/net/netdevsim/dev.c:1349 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1362 [inline] nsim_dev_reload_destroy+0x15e/0x240 drivers/net/netdevsim/dev.c:1561 nsim_dev_remove+0x59/0x100 drivers/net/netdevsim/dev.c:1577 __device_release_driver drivers/base/dd.c:1227 [inline] device_release_driver_internal+0x4cb/0x7f0 drivers/base/dd.c:1262 bus_remove_device+0x2e5/0x400 drivers/base/bus.c:529 device_del+0x6e2/0xbd0 drivers/base/core.c:3582 device_unregister+0x1c/0xc0 drivers/base/core.c:3615 nsim_bus_dev_del drivers/net/netdevsim/bus.c:454 [inline] del_device_store+0x321/0x470 drivers/net/netdevsim/bus.c:354 kernfs_fop_write_iter+0x3a2/0x4f0 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2103 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0xacf/0xe50 fs/read_write.c:594 ksys_write+0x1a2/0x2c0 fs/read_write.c:647 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 Second to last potentially related work creation: kasan_save_stack+0x36/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:348 kvfree_call_rcu+0x118/0x8a0 kernel/rcu/tree.c:3583 drop_sysctl_table+0x317/0x460 fs/proc/proc_sysctl.c:1680 drop_sysctl_table+0x329/0x460 fs/proc/proc_sysctl.c:1683 unregister_sysctl_table+0x88/0x130 fs/proc/proc_sysctl.c:1718 neigh_sysctl_unregister+0x74/0x90 net/core/neighbour.c:3720 devinet_sysctl_unregister net/ipv4/devinet.c:2629 [inline] inetdev_destroy net/ipv4/devinet.c:324 [inline] inetdev_event+0x814/0x1490 net/ipv4/devinet.c:1598 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:1998 [inline] call_netdevice_notifiers_extack net/core/dev.c:2010 [inline] call_netdevice_notifiers net/core/dev.c:2024 [inline] unregister_netdevice_many+0xf1b/0x18f0 net/core/dev.c:11067 default_device_exit_batch+0x390/0x3f0 net/core/dev.c:11596 ops_exit_list net/core/net_namespace.c:174 [inline] cleanup_net+0x763/0xb60 net/core/net_namespace.c:596 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457 kthread+0x3f6/0x4f0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the object at ffff8880129aaa00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes to the right of 256-byte region [ffff8880129aaa00, ffff8880129aab00) The buggy address belongs to the page: page:ffffea00004a6a80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x129aa head:ffffea00004a6a80 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001d9fd80 0000000a0000000a ffff888011c41b40 raw: 0000000000000000 0000000080100010 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3551, ts 252863018517, free_ts 252829573850 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] kzalloc include/linux/slab.h:721 [inline] new_dir fs/proc/proc_sysctl.c:954 [inline] get_subdir fs/proc/proc_sysctl.c:999 [inline] __register_sysctl_table+0x9f1/0x1220 fs/proc/proc_sysctl.c:1348 mpls_dev_sysctl_register+0x1ed/0x2d0 net/mpls/af_mpls.c:1421 mpls_add_dev net/mpls/af_mpls.c:1476 [inline] mpls_dev_notify+0x2fc/0x780 net/mpls/af_mpls.c:1621 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:1998 [inline] call_netdevice_notifiers_extack net/core/dev.c:2010 [inline] call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2024 register_netdevice+0x12c2/0x1700 net/core/dev.c:10362 register_netdev+0x37/0x50 net/core/dev.c:10455 ip6_tnl_init_net+0x22c/0x2e0 net/ipv6/ip6_tunnel.c:2289 ops_init+0x356/0x600 net/core/net_namespace.c:135 setup_net+0x358/0x9e0 net/core/net_namespace.c:329 copy_net_ns+0x395/0x5d0 net/core/net_namespace.c:473 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 free_slab mm/slub.c:2015 [inline] discard_slab mm/slub.c:2021 [inline] __unfreeze_partials+0x1b7/0x210 mm/slub.c:2507 put_cpu_partial+0x132/0x1a0 mm/slub.c:2587 do_slab_free mm/slub.c:3487 [inline] ___cache_free+0xe3/0x100 mm/slub.c:3506 qlist_free_all+0x36/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x162/0x180 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x53/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc_track_caller+0x11e/0x300 mm/slub.c:4925 kvasprintf+0xd6/0x180 lib/kasprintf.c:25 kobject_set_name_vargs+0x5d/0x110 lib/kobject.c:297 kobject_add_varg lib/kobject.c:392 [inline] kobject_init_and_add+0xda/0x190 lib/kobject.c:481 netdev_queue_add_kobject net/core/net-sysfs.c:1666 [inline] netdev_queue_update_kobjects+0x186/0x3f0 net/core/net-sysfs.c:1711 register_queue_kobjects net/core/net-sysfs.c:1772 [inline] netdev_register_kobject+0x263/0x310 net/core/net-sysfs.c:2018 register_netdevice+0x1067/0x1700 net/core/dev.c:10331 Memory state around the buggy address: ffff8880129aaa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880129aaa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880129aab00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880129aab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880129aac00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================