================================================================== 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 ffff0000d3ff2140 by task kworker/0:16/14000 CPU: 0 PID: 14000 Comm: kworker/0:16 Not tainted 6.1.81-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Workqueue: rcu_gp process_srcu 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_counter_get_cntvct arch/arm64/include/asm/arch_timer.h:210 [inline] arch_counter_get_cntvct+0x14/0x30 drivers/clocksource/arm_arch_timer.c:210 __delay+0x1e4/0x2bc arch/arm64/lib/delay.c:48 __const_udelay arch/arm64/lib/delay.c:55 [inline] __udelay+0x60/0x70 arch/arm64/lib/delay.c:61 try_check_zero+0x3b4/0x3e4 kernel/rcu/srcutree.c:975 srcu_advance_state kernel/rcu/srcutree.c:1549 [inline] process_srcu+0x168/0x10e0 kernel/rcu/srcutree.c:1650 process_one_work+0x7ac/0x1404 kernel/workqueue.c:2292 worker_thread+0x8e4/0xfec kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864 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 Last potentially related work creation: kasan_save_stack+0x40/0x70 mm/kasan/common.c:45 __kasan_record_aux_stack+0xcc/0xe8 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496 insert_work+0x64/0x384 kernel/workqueue.c:1361 __queue_work+0xd48/0x136c kernel/workqueue.c:1520 delayed_work_timer_fn+0x74/0x90 kernel/workqueue.c:1646 call_timer_fn+0x1c0/0xa1c kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1514 [inline] __run_timers+0x584/0x718 kernel/time/timer.c:1790 run_timer_softirq+0xcc/0x114 kernel/time/timer.c:1805 __do_softirq+0x314/0xe38 kernel/softirq.c:571 Second to last potentially related work creation: kasan_save_stack+0x40/0x70 mm/kasan/common.c:45 __kasan_record_aux_stack+0xcc/0xe8 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496 insert_work+0x64/0x384 kernel/workqueue.c:1361 __queue_work+0xd48/0x136c kernel/workqueue.c:1520 delayed_work_timer_fn+0x74/0x90 kernel/workqueue.c:1646 call_timer_fn+0x1c0/0xa1c kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1514 [inline] __run_timers+0x584/0x718 kernel/time/timer.c:1790 run_timer_softirq+0xcc/0x114 kernel/time/timer.c:1805 __do_softirq+0x314/0xe38 kernel/softirq.c:571 The buggy address belongs to the object at ffff0000d3ff1c40 which belongs to the cache net_namespace of size 6976 The buggy address is located 1280 bytes inside of 6976-byte region [ffff0000d3ff1c40, ffff0000d3ff3780) The buggy address belongs to the physical page: page:00000000bd33c1e5 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x113ff0 head:00000000bd33c1e5 order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff0000dbe1bc01 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 0000000000000000 dead000000000122 ffff0000c03de180 raw: 0000000000000000 0000000080040004 00000001ffffffff ffff0000dbe1bc01 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d3ff2000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d3ff2080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000d3ff2100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d3ff2180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d3ff2200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================