================================================================== BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:71 [inline] BUG: KASAN: use-after-free in atomic_long_read include/linux/atomic/atomic-instrumented.h:1183 [inline] BUG: KASAN: use-after-free in __down_read_trylock kernel/locking/rwsem.c:1317 [inline] BUG: KASAN: use-after-free in down_read_trylock+0x7c/0x300 kernel/locking/rwsem.c:1584 Read of size 8 at addr ffff88815f598070 by task kworker/u4:8/9272 CPU: 1 PID: 9272 Comm: kworker/u4:8 Not tainted 5.15.106-syzkaller-00249-g19c0ed55a470 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 Workqueue: writeback wb_workfn (flush-7:3) Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 print_address_description+0x87/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:444 kasan_check_range+0x293/0x2a0 mm/kasan/generic.c:189 __kasan_check_read+0x11/0x20 mm/kasan/shadow.c:31 instrument_atomic_read include/linux/instrumented.h:71 [inline] atomic_long_read include/linux/atomic/atomic-instrumented.h:1183 [inline] __down_read_trylock kernel/locking/rwsem.c:1317 [inline] down_read_trylock+0x7c/0x300 kernel/locking/rwsem.c:1584 trylock_super+0x1f/0xf0 fs/super.c:418 __writeback_inodes_wb+0x101/0x3f0 fs/fs-writeback.c:1967 wb_writeback+0x3cd/0x9e0 fs/fs-writeback.c:2081 wb_check_old_data_flush fs/fs-writeback.c:2181 [inline] wb_do_writeback fs/fs-writeback.c:2234 [inline] wb_workfn+0xb3d/0x1110 fs/fs-writeback.c:2263 process_one_work+0x6bb/0xc10 kernel/workqueue.c:2313 worker_thread+0xad5/0x12a0 kernel/workqueue.c:2460 kthread+0x421/0x510 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Allocated by task 11904: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:433 [inline] ____kasan_kmalloc+0xdb/0x110 mm/kasan/common.c:512 __kasan_kmalloc+0x9/0x10 mm/kasan/common.c:521 kasan_kmalloc include/linux/kasan.h:227 [inline] __kmalloc_track_caller+0x139/0x260 mm/slub.c:4948 kmemdup+0x24/0x50 mm/util.c:131 neigh_sysctl_register+0xb0/0x530 net/core/neighbour.c:3669 devinet_sysctl_register+0xaa/0x1e0 net/ipv4/devinet.c:2614 inetdev_init+0x284/0x4b0 net/ipv4/devinet.c:276 inetdev_event+0x205/0x1040 net/ipv4/devinet.c:1530 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2005 [inline] call_netdevice_notifiers_extack net/core/dev.c:2017 [inline] call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2031 register_netdevice+0xff1/0x1350 net/core/dev.c:10365 register_netdev+0x3c/0x50 net/core/dev.c:10458 ip6_tnl_init_net+0x2da/0x390 net/ipv6/ip6_tunnel.c:2289 ops_init+0x1cf/0x4a0 net/core/net_namespace.c:135 setup_net+0x34b/0xb50 net/core/net_namespace.c:329 copy_net_ns+0x381/0x5f0 net/core/net_namespace.c:473 create_new_namespaces+0x416/0x670 kernel/nsproxy.c:110 copy_namespaces+0x1d1/0x220 kernel/nsproxy.c:178 copy_process+0x12e7/0x3260 kernel/fork.c:2259 kernel_clone+0x21e/0x9e0 kernel/fork.c:2659 __do_sys_clone3 kernel/fork.c:2943 [inline] __se_sys_clone3 kernel/fork.c:2927 [inline] __x64_sys_clone3+0x376/0x3a0 kernel/fork.c:2927 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 Freed by task 11775: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x126/0x160 mm/kasan/common.c:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0xbd/0x190 mm/slub.c:1749 slab_free mm/slub.c:3517 [inline] kfree+0xc8/0x220 mm/slub.c:4577 neigh_sysctl_unregister+0x80/0x90 net/core/neighbour.c:3755 devinet_sysctl_unregister net/ipv4/devinet.c:2629 [inline] inetdev_destroy net/ipv4/devinet.c:324 [inline] inetdev_event+0x7c1/0x1040 net/ipv4/devinet.c:1598 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2005 [inline] call_netdevice_notifiers_extack net/core/dev.c:2017 [inline] call_netdevice_notifiers net/core/dev.c:2031 [inline] unregister_netdevice_many+0xe0a/0x17c0 net/core/dev.c:11080 ip6_tnl_exit_batch_net+0x3c4/0x410 net/ipv6/ip6_tunnel.c:2312 ops_exit_list net/core/net_namespace.c:174 [inline] cleanup_net+0x6ce/0xc00 net/core/net_namespace.c:596 process_one_work+0x6bb/0xc10 kernel/workqueue.c:2313 worker_thread+0xad5/0x12a0 kernel/workqueue.c:2460 kthread+0x421/0x510 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd3/0xf0 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 insert_work+0x56/0x320 kernel/workqueue.c:1369 __queue_work+0x923/0xcd0 kernel/workqueue.c:1535 queue_work_on+0x105/0x170 kernel/workqueue.c:1562 queue_work include/linux/workqueue.h:507 [inline] schedule_work include/linux/workqueue.h:568 [inline] destroy_super_rcu+0xd1/0xe0 fs/super.c:172 rcu_do_batch+0x57a/0xc10 kernel/rcu/tree.c:2509 rcu_core+0x517/0x1020 kernel/rcu/tree.c:2749 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2762 __do_softirq+0x26d/0x5bf kernel/softirq.c:565 Second to last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd3/0xf0 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu kernel/rcu/tree.c:2993 [inline] call_rcu+0x133/0x12a0 kernel/rcu/tree.c:3073 __put_super+0x26d/0x2e0 fs/super.c:299 put_super fs/super.c:313 [inline] deactivate_locked_super+0xe1/0x110 fs/super.c:346 deactivate_super+0xbe/0xf0 fs/super.c:366 cleanup_mnt+0x45c/0x510 fs/namespace.c:1143 __cleanup_mnt+0x19/0x20 fs/namespace.c:1150 task_work_run+0x129/0x190 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xc4/0xe0 kernel/entry/common.c:175 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x26/0x160 kernel/entry/common.c:301 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff88815f598000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 112 bytes inside of 2048-byte region [ffff88815f598000, ffff88815f598800) The buggy address belongs to the page: page:ffffea00057d6600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x15f598 head:ffffea00057d6600 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100043200 raw: 0000000000000000 0000000000080008 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 529, ts 243699366838, free_ts 0 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2502 prep_new_page mm/page_alloc.c:2508 [inline] get_page_from_freelist+0x2c14/0x2cf0 mm/page_alloc.c:4291 __alloc_pages+0x386/0x7b0 mm/page_alloc.c:5569 allocate_slab mm/slub.c:1930 [inline] new_slab+0x92/0x490 mm/slub.c:1993 ___slab_alloc+0x39e/0x830 mm/slub.c:3026 __slab_alloc+0x4a/0x90 mm/slub.c:3113 slab_alloc_node mm/slub.c:3204 [inline] slab_alloc mm/slub.c:3246 [inline] kmem_cache_alloc_trace+0x142/0x210 mm/slub.c:3263 kmalloc include/linux/slab.h:608 [inline] kzalloc include/linux/slab.h:738 [inline] ipv6_add_dev+0xd1/0x1140 net/ipv6/addrconf.c:385 addrconf_notify+0x593/0xdd0 net/ipv6/addrconf.c:3574 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2005 [inline] call_netdevice_notifiers_extack net/core/dev.c:2017 [inline] call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2031 register_netdevice+0xff1/0x1350 net/core/dev.c:10365 veth_newlink+0x948/0xe30 drivers/net/veth.c:1733 __rtnl_newlink net/core/rtnetlink.c:3462 [inline] rtnl_newlink+0x146e/0x2040 net/core/rtnetlink.c:3510 rtnetlink_rcv_msg+0x951/0xc40 net/core/rtnetlink.c:5587 netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2533 page_owner free stack trace missing Memory state around the buggy address: ffff88815f597f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88815f597f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88815f598000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88815f598080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88815f598100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================