================================================================== BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: use-after-free in atomic_dec_return include/linux/atomic/atomic-instrumented.h:251 [inline] BUG: KASAN: use-after-free in rxrpc_put_bundle+0x1d/0x80 net/rxrpc/conn_client.c:147 Write of size 4 at addr ffff888076fdfd20 by task ksoftirqd/0/13 CPU: 0 PID: 13 Comm: ksoftirqd/0 Not tainted 5.16.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x2ed mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:450 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_dec_return include/linux/atomic/atomic-instrumented.h:251 [inline] rxrpc_put_bundle+0x1d/0x80 net/rxrpc/conn_client.c:147 rxrpc_destroy_connection+0x128/0x2c0 net/rxrpc/conn_object.c:365 rcu_do_batch kernel/rcu/tree.c:2506 [inline] rcu_core+0x7ab/0x1470 kernel/rcu/tree.c:2741 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 run_ksoftirqd kernel/softirq.c:921 [inline] run_ksoftirqd+0x2d/0x60 kernel/softirq.c:913 smpboot_thread_fn+0x645/0x9c0 kernel/smpboot.c:164 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 32479: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa6/0xd0 mm/kasan/common.c:522 kasan_kmalloc include/linux/kasan.h:269 [inline] kmem_cache_alloc_trace+0x1ea/0x4a0 mm/slab.c:3575 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:724 [inline] rxrpc_alloc_bundle+0x8c/0x300 net/rxrpc/conn_client.c:121 rxrpc_look_up_bundle net/rxrpc/conn_client.c:299 [inline] rxrpc_prep_call net/rxrpc/conn_client.c:372 [inline] rxrpc_connect_call+0x5a5/0x15c0 net/rxrpc/conn_client.c:708 rxrpc_new_client_call+0x961/0x1020 net/rxrpc/call_object.c:330 rxrpc_new_client_call_for_sendmsg net/rxrpc/sendmsg.c:605 [inline] rxrpc_do_sendmsg+0xee8/0x1350 net/rxrpc/sendmsg.c:658 rxrpc_sendmsg+0x420/0x630 net/rxrpc/af_rxrpc.c:561 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2409 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2492 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 13: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free mm/kasan/common.c:328 [inline] __kasan_slab_free+0xd1/0x110 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:235 [inline] __cache_free mm/slab.c:3445 [inline] kfree+0x10d/0x2c0 mm/slab.c:3802 rxrpc_free_bundle net/rxrpc/conn_client.c:141 [inline] rxrpc_put_bundle+0x6b/0x80 net/rxrpc/conn_client.c:151 rxrpc_destroy_connection+0x128/0x2c0 net/rxrpc/conn_object.c:365 rcu_do_batch kernel/rcu/tree.c:2506 [inline] rcu_core+0x7ab/0x1470 kernel/rcu/tree.c:2741 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 Last potentially related work creation: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xb5/0xe0 mm/kasan/generic.c:348 insert_work+0x48/0x370 kernel/workqueue.c:1354 __queue_work+0x5ca/0xee0 kernel/workqueue.c:1520 queue_work_on+0xee/0x110 kernel/workqueue.c:1547 queue_work include/linux/workqueue.h:502 [inline] call_usermodehelper_exec+0x347/0x4c0 kernel/umh.c:435 call_modprobe kernel/kmod.c:98 [inline] __request_module+0x430/0xa60 kernel/kmod.c:170 search_binary_handler fs/exec.c:1738 [inline] exec_binprm fs/exec.c:1764 [inline] bprm_execve fs/exec.c:1833 [inline] bprm_execve+0x941/0x19b0 fs/exec.c:1795 do_execveat_common+0x5e3/0x780 fs/exec.c:1922 do_execve fs/exec.c:1990 [inline] __do_sys_execve fs/exec.c:2066 [inline] __se_sys_execve fs/exec.c:2061 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:2061 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xb5/0xe0 mm/kasan/generic.c:348 insert_work+0x48/0x370 kernel/workqueue.c:1354 __queue_work+0x5ca/0xee0 kernel/workqueue.c:1520 queue_work_on+0xee/0x110 kernel/workqueue.c:1547 queue_work include/linux/workqueue.h:502 [inline] call_usermodehelper_exec+0x1f0/0x4c0 kernel/umh.c:435 kobject_uevent_env+0xf8f/0x1650 lib/kobject_uevent.c:618 rx_queue_add_kobject net/core/net-sysfs.c:1069 [inline] net_rx_queue_update_kobjects+0xf8/0x500 net/core/net-sysfs.c:1109 register_queue_kobjects net/core/net-sysfs.c:1766 [inline] netdev_register_kobject+0x275/0x430 net/core/net-sysfs.c:2014 register_netdevice+0xd31/0x1500 net/core/dev.c:10336 veth_newlink+0x593/0xb00 drivers/net/veth.c:1726 __rtnl_newlink+0x106d/0x1750 net/core/rtnetlink.c:3458 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3506 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5571 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2496 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x904/0xdf0 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 __sys_sendto+0x21c/0x320 net/socket.c:2036 __do_sys_sendto net/socket.c:2048 [inline] __se_sys_sendto net/socket.c:2044 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2044 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888076fdfd00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 32 bytes inside of 192-byte region [ffff888076fdfd00, ffff888076fdfdc0) The buggy address belongs to the page: page:ffffea0001dbf7c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888076fdfc00 pfn:0x76fdf flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0001bf7348 ffffea0001be3f48 ffff888010c40000 raw: ffff888076fdfc00 ffff888076fdf000 000000010000000c 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 24039, ts 2484648602781, free_ts 2475660793047 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4149 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5369 __alloc_pages_node include/linux/gfp.h:570 [inline] kmem_getpages mm/slab.c:1377 [inline] cache_grow_begin+0x75/0x470 mm/slab.c:2593 cache_alloc_refill+0x27f/0x380 mm/slab.c:2965 ____cache_alloc mm/slab.c:3048 [inline] ____cache_alloc mm/slab.c:3031 [inline] __do_cache_alloc mm/slab.c:3275 [inline] slab_alloc mm/slab.c:3316 [inline] __do_kmalloc mm/slab.c:3700 [inline] __kmalloc_track_caller+0x3b0/0x4d0 mm/slab.c:3717 kmemdup+0x23/0x50 mm/util.c:128 kmemdup include/linux/fortify-string.h:304 [inline] neigh_parms_alloc+0x7e/0x540 net/core/neighbour.c:1663 ipv6_add_dev+0x30c/0x1170 net/ipv6/addrconf.c:400 addrconf_notify+0x60e/0x1bb0 net/ipv6/addrconf.c:3510 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2002 call_netdevice_notifiers_extack net/core/dev.c:2014 [inline] call_netdevice_notifiers net/core/dev.c:2028 [inline] register_netdevice+0x1073/0x1500 net/core/dev.c:10367 veth_newlink+0x3fc/0xb00 drivers/net/veth.c:1695 __rtnl_newlink+0x106d/0x1750 net/core/rtnetlink.c:3458 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3506 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5571 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3309 [inline] free_unref_page_list+0x1a9/0xfa0 mm/page_alloc.c:3425 release_pages+0x3f4/0x1480 mm/swap.c:980 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:242 [inline] tlb_flush_mmu mm/mmu_gather.c:249 [inline] tlb_finish_mmu+0x165/0x8c0 mm/mmu_gather.c:340 exit_mmap+0x1ea/0x630 mm/mmap.c:3172 __mmput+0x122/0x4b0 kernel/fork.c:1113 mmput+0x56/0x60 kernel/fork.c:1134 exit_mm kernel/exit.c:507 [inline] do_exit+0xb27/0x2b40 kernel/exit.c:819 do_group_exit+0x125/0x310 kernel/exit.c:929 get_signal+0x47d/0x2220 kernel/signal.c:2852 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff888076fdfc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888076fdfc80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888076fdfd00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888076fdfd80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888076fdfe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================