================================================================== BUG: KASAN: use-after-free in __hlist_del include/linux/list.h:884 [inline] BUG: KASAN: use-after-free in hlist_del_init_rcu include/linux/rculist.h:184 [inline] BUG: KASAN: use-after-free in rxrpc_destroy_local+0x2ad/0x2f0 net/rxrpc/local_object.c:389 Write of size 8 at addr ffff888058d8c820 by task krxrpcio/7001/5341 CPU: 0 PID: 5341 Comm: krxrpcio/7001 Not tainted 6.1.0-syzkaller-09664-g2d7afdcbc9d3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15e/0x45d mm/kasan/report.c:395 kasan_report+0xbf/0x1f0 mm/kasan/report.c:495 __hlist_del include/linux/list.h:884 [inline] hlist_del_init_rcu include/linux/rculist.h:184 [inline] rxrpc_destroy_local+0x2ad/0x2f0 net/rxrpc/local_object.c:389 rxrpc_io_thread+0xcde/0xfa0 net/rxrpc/io_thread.c:492 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Allocated by task 13959: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa5/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc_node_track_caller+0x5b/0xc0 mm/slab_common.c:988 kmalloc_reserve net/core/skbuff.c:492 [inline] pskb_expand_head+0x211/0x1110 net/core/skbuff.c:1899 __skb_cow include/linux/skbuff.h:3537 [inline] skb_cow_head include/linux/skbuff.h:3571 [inline] batadv_skb_head_push+0xeb/0x280 net/batman-adv/soft-interface.c:73 batadv_send_skb_packet+0x114/0x690 net/batman-adv/send.c:86 batadv_iv_ogm_send_to_if net/batman-adv/bat_iv_ogm.c:393 [inline] batadv_iv_ogm_emit net/batman-adv/bat_iv_ogm.c:421 [inline] batadv_iv_send_outstanding_bat_ogm_packet+0x6db/0x910 net/batman-adv/bat_iv_ogm.c:1701 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Freed by task 13959: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2e/0x40 mm/kasan/generic.c:518 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0xaf/0x3b0 mm/slub.c:3800 skb_free_head+0xac/0x110 net/core/skbuff.c:822 skb_release_data+0x5f4/0x870 net/core/skbuff.c:851 skb_release_all net/core/skbuff.c:916 [inline] __kfree_skb net/core/skbuff.c:930 [inline] kfree_skb_reason+0x1ab/0x4f0 net/core/skbuff.c:956 __netif_receive_skb_core+0x59e/0x3940 net/core/dev.c:5456 __netif_receive_skb_one_core+0xae/0x180 net/core/dev.c:5480 __netif_receive_skb+0x1f/0x1c0 net/core/dev.c:5596 process_backlog+0x3e4/0x810 net/core/dev.c:5924 __napi_poll+0xb8/0x770 net/core/dev.c:6485 napi_poll net/core/dev.c:6552 [inline] net_rx_action+0xa00/0xde0 net/core/dev.c:6663 __do_softirq+0x1fb/0xadc kernel/softirq.c:571 Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:488 __call_rcu_common.constprop.0+0x99/0x820 kernel/rcu/tree.c:2753 rxrpc_put_local.part.0+0x128/0x170 net/rxrpc/local_object.c:332 rxrpc_put_local+0x25/0x30 net/rxrpc/local_object.c:324 rxrpc_clean_up_connection+0x3ac/0x4b0 net/rxrpc/conn_object.c:318 rxrpc_put_connection.part.0+0x1e8/0x210 net/rxrpc/conn_object.c:356 rxrpc_put_connection+0x25/0x30 net/rxrpc/conn_object.c:339 rxrpc_discard_expired_client_conns+0x388/0x500 net/rxrpc/conn_client.c:1059 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Second to last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:488 insert_work+0x48/0x350 kernel/workqueue.c:1358 __queue_work+0x693/0x13b0 kernel/workqueue.c:1517 queue_work_on+0xf2/0x110 kernel/workqueue.c:1545 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:169 cleanup_net+0x4ee/0xb10 net/core/net_namespace.c:606 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The buggy address belongs to the object at ffff888058d8c800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 32 bytes inside of 1024-byte region [ffff888058d8c800, ffff888058d8cc00) The buggy address belongs to the physical page: page:ffffea0001636200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58d88 head:ffffea0001636200 order:3 compound_mapcount:0 compound_pincount:0 anon flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012441dc0 0000000000000000 dead000000000001 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 12248, tgid 12239 (syz-executor.0), ts 328886016353, free_ts 327321591939 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4291 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5558 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2285 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x350 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x1a4/0x430 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc_node+0x4d/0xd0 mm/slab_common.c:975 kmalloc_node include/linux/slab.h:610 [inline] kvmalloc_node+0xa2/0x1a0 mm/util.c:581 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] bucket_table_alloc.isra.0+0x8c/0x480 lib/rhashtable.c:184 rhashtable_init+0x38b/0x7e0 lib/rhashtable.c:1065 fqdir_init+0xb4/0x1d0 net/ipv4/inet_fragment.c:196 ipv6_frags_init_net+0x2b/0x350 net/ipv6/reassembly.c:534 ops_init+0xb9/0x680 net/core/net_namespace.c:135 setup_net+0x793/0xe60 net/core/net_namespace.c:333 copy_net_ns+0x31b/0x6b0 net/core/net_namespace.c:483 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x1d/0x4d0 mm/page_alloc.c:3483 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x192/0x220 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x66/0x90 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:761 [inline] slab_alloc_node mm/slub.c:3452 [inline] __kmem_cache_alloc_node+0x1ea/0x430 mm/slub.c:3491 kmalloc_trace+0x26/0x60 mm/slab_common.c:1062 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] ref_tracker_alloc+0x158/0x560 lib/ref_tracker.c:85 __netdev_tracker_alloc include/linux/netdevice.h:4020 [inline] netdev_hold include/linux/netdevice.h:4049 [inline] netdev_hold include/linux/netdevice.h:4044 [inline] netdev_queue_add_kobject net/core/net-sysfs.c:1663 [inline] netdev_queue_update_kobjects+0x1ab/0x4f0 net/core/net-sysfs.c:1718 register_queue_kobjects net/core/net-sysfs.c:1779 [inline] netdev_register_kobject+0x334/0x400 net/core/net-sysfs.c:2019 register_netdevice+0xd77/0x1640 net/core/dev.c:10045 register_netdev+0x31/0x50 net/core/dev.c:10173 ip6gre_init_net+0x3d1/0x630 net/ipv6/ip6_gre.c:1617 ops_init+0xb9/0x680 net/core/net_namespace.c:135 setup_net+0x793/0xe60 net/core/net_namespace.c:333 copy_net_ns+0x31b/0x6b0 net/core/net_namespace.c:483 Memory state around the buggy address: ffff888058d8c700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888058d8c780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888058d8c800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888058d8c880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888058d8c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================