================================================================== BUG: KASAN: use-after-free in tcp_or_dccp_get_hashinfo include/net/inet_hashtables.h:186 [inline] BUG: KASAN: use-after-free in reqsk_queue_unlink net/ipv4/inet_connection_sock.c:956 [inline] BUG: KASAN: use-after-free in inet_csk_reqsk_queue_drop+0xdc/0x384 net/ipv4/inet_connection_sock.c:970 Read of size 8 at addr ffff000004b50500 by task syz-executor.1/11377 CPU: 1 PID: 11377 Comm: syz-executor.1 Not tainted 6.1.82-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x174/0x4c0 mm/kasan/report.c:395 kasan_report+0xd4/0x130 mm/kasan/report.c:495 __asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351 tcp_or_dccp_get_hashinfo include/net/inet_hashtables.h:186 [inline] reqsk_queue_unlink net/ipv4/inet_connection_sock.c:956 [inline] inet_csk_reqsk_queue_drop+0xdc/0x384 net/ipv4/inet_connection_sock.c:970 inet_csk_reqsk_queue_drop_and_put net/ipv4/inet_connection_sock.c:982 [inline] reqsk_timer_handler+0x704/0xd48 net/ipv4/inet_connection_sock.c:1096 call_timer_fn+0x1c0/0xa1c kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers+0x554/0x718 kernel/time/timer.c:1790 run_timer_softirq+0x7c/0x114 kernel/time/timer.c:1803 __do_softirq+0x314/0xe38 kernel/softirq.c:571 ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:893 do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:85 invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0x264/0x4d4 kernel/softirq.c:650 irq_exit_rcu+0x14/0x84 kernel/softirq.c:662 __el1_irq arch/arm64/kernel/entry-common.c:472 [inline] el1_interrupt+0x38/0x68 arch/arm64/kernel/entry-common.c:486 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:491 el1h_64_irq+0x64/0x68 arch/arm64/kernel/entry.S:581 arch_local_irq_restore arch/arm64/include/asm/irqflags.h:122 [inline] consume_stock mm/memcontrol.c:2240 [inline] try_charge_memcg+0x300/0x1478 mm/memcontrol.c:2642 obj_cgroup_charge_pages mm/memcontrol.c:3096 [inline] __memcg_kmem_charge_page+0x330/0x61c mm/memcontrol.c:3122 __alloc_pages+0x254/0x730 mm/page_alloc.c:5562 __alloc_pages_node include/linux/gfp.h:237 [inline] alloc_pages_node include/linux/gfp.h:260 [inline] bpf_ringbuf_area_alloc kernel/bpf/ringbuf.c:130 [inline] bpf_ringbuf_alloc+0x100/0x434 kernel/bpf/ringbuf.c:167 ringbuf_map_alloc+0x19c/0x288 kernel/bpf/ringbuf.c:207 find_and_alloc_map kernel/bpf/syscall.c:131 [inline] map_create+0x48c/0xbc8 kernel/bpf/syscall.c:1128 __sys_bpf+0x284/0x654 kernel/bpf/syscall.c:4987 __do_sys_bpf kernel/bpf/syscall.c:5109 [inline] __se_sys_bpf kernel/bpf/syscall.c:5107 [inline] __arm64_sys_bpf+0x80/0x98 kernel/bpf/syscall.c:5107 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Allocated by task 4262: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505 __kasan_slab_alloc+0x74/0x8c mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x74/0x458 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x230/0x37c mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:682 [inline] net_alloc net/core/net_namespace.c:410 [inline] copy_net_ns+0x124/0x590 net/core/net_namespace.c:465 create_new_namespaces+0x344/0x614 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x108/0x158 kernel/nsproxy.c:226 ksys_unshare+0x45c/0x874 kernel/fork.c:3203 __do_sys_unshare kernel/fork.c:3274 [inline] __se_sys_unshare kernel/fork.c:3272 [inline] __arm64_sys_unshare+0x3c/0x50 kernel/fork.c:3272 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the object at ffff000004b50000 which belongs to the cache net_namespace of size 6976 The buggy address is located 1280 bytes inside of 6976-byte region [ffff000004b50000, ffff000004b51b40) The buggy address belongs to the physical page: page:00000000a121b105 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff000004b50000 pfn:0x44b50 head:00000000a121b105 order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff0000ca93d401 flags: 0x1ffc00000010200(slab|head|node=0|zone=0|lastcpupid=0x7ff) raw: 01ffc00000010200 0000000000000000 dead000000000001 ffff0000c03de180 raw: ffff000004b50000 0000000080040000 00000001ffffffff ffff0000ca93d401 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff000004b50400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff000004b50480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff000004b50500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff000004b50580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff000004b50600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================