================================================================== 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+0xf3/0x3b0 net/ipv4/inet_connection_sock.c:970 Read of size 8 at addr ffff888156ea8500 by task kworker/1:15/4396 CPU: 1 PID: 4396 Comm: kworker/1:15 Not tainted 6.1.82-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024 Workqueue: rcu_gp process_srcu Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 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+0xf3/0x3b0 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+0x90b/0xe70 net/ipv4/inet_connection_sock.c:1096 call_timer_fn+0x1ad/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers+0x67c/0x890 kernel/time/timer.c:1790 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803 __do_softirq+0x2e9/0xa4c kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x155/0x240 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653 RIP: 0010:preempt_count_sub+0x0/0x160 kernel/sched/core.c:5730 Code: ff 48 c7 c1 68 97 73 8e 80 e1 07 80 c1 03 38 c1 7c 80 48 c7 c7 68 97 73 8e e8 2c b5 83 00 e9 6f ff ff ff 0f 1f 80 00 00 00 00 <41> 56 53 89 fb 48 c7 c0 60 e1 c8 91 48 c1 e8 03 49 be 00 00 00 00 RSP: 0018:ffffc9001362fae8 EFLAGS: 00000206 RAX: 00000000094a8b9a RBX: 0000022c094a7fe8 RCX: 0000000000000001 RDX: 000000000000022c RSI: ffffffff8b3d2b20 RDI: 0000000000000001 RBP: 0000000000000bb2 R08: ffffffff8436a614 R09: fffffbfff1ce6c56 R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffffffff1ce6c97 R13: 000000000004753e R14: 0000000000002af9 R15: 0000000000000001 delay_tsc+0x4b/0xd0 arch/x86/lib/delay.c:77 try_check_zero+0x3ee/0x410 kernel/rcu/srcutree.c:975 srcu_advance_state kernel/rcu/srcutree.c:1549 [inline] process_srcu+0x1dc/0x1300 kernel/rcu/srcutree.c:1650 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307 Allocated by task 29686: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x52/0x3a0 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+0x10c/0x2d0 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+0x143/0x5d0 net/core/net_namespace.c:465 create_new_namespaces+0x425/0x7a0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x11e/0x170 kernel/nsproxy.c:226 ksys_unshare+0x580/0xb20 kernel/fork.c:3203 __do_sys_unshare kernel/fork.c:3274 [inline] __se_sys_unshare kernel/fork.c:3272 [inline] __x64_sys_unshare+0x34/0x40 kernel/fork.c:3272 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486 insert_work+0x54/0x3d0 kernel/workqueue.c:1361 __queue_work+0xb4b/0xf90 kernel/workqueue.c:1520 call_timer_fn+0x1ad/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1514 [inline] __run_timers+0x6a8/0x890 kernel/time/timer.c:1790 __do_softirq+0x2e9/0xa4c kernel/softirq.c:571 Second to last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486 insert_work+0x54/0x3d0 kernel/workqueue.c:1361 __queue_work+0xb4b/0xf90 kernel/workqueue.c:1520 call_timer_fn+0x1ad/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1514 [inline] __run_timers+0x6a8/0x890 kernel/time/timer.c:1790 __do_softirq+0x2e9/0xa4c kernel/softirq.c:571 The buggy address belongs to the object at ffff888156ea8000 which belongs to the cache net_namespace of size 6976 The buggy address is located 1280 bytes inside of 6976-byte region [ffff888156ea8000, ffff888156ea9b40) The buggy address belongs to the physical page: page:ffffea00055baa00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888156ea8000 pfn:0x156ea8 head:ffffea00055baa00 order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff888140a29dc1 flags: 0x57ff00000010200(slab|head|node=1|zone=2|lastcpupid=0x7ff) raw: 057ff00000010200 ffffea0001dce000 dead000000000003 ffff888140009500 raw: ffff888156ea8000 0000000080040001 00000001ffffffff ffff888140a29dc1 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 3579, tgid 3579 (syz-executor.1), ts 185452469828, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2513 prep_new_page mm/page_alloc.c:2520 [inline] get_page_from_freelist+0x31a1/0x3320 mm/page_alloc.c:4279 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5545 alloc_slab_page+0x6a/0x150 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x84/0x2d0 mm/slub.c:1992 ___slab_alloc+0xc20/0x1270 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x1a5/0x2d0 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+0x143/0x5d0 net/core/net_namespace.c:465 create_new_namespaces+0x425/0x7a0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x11e/0x170 kernel/nsproxy.c:226 ksys_unshare+0x580/0xb20 kernel/fork.c:3203 __do_sys_unshare kernel/fork.c:3274 [inline] __se_sys_unshare kernel/fork.c:3272 [inline] __x64_sys_unshare+0x34/0x40 kernel/fork.c:3272 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd page_owner free stack trace missing Memory state around the buggy address: ffff888156ea8400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888156ea8480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888156ea8500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888156ea8580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888156ea8600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess), 1 bytes skipped: 0: 48 c7 c1 68 97 73 8e mov $0xffffffff8e739768,%rcx 7: 80 e1 07 and $0x7,%cl a: 80 c1 03 add $0x3,%cl d: 38 c1 cmp %al,%cl f: 7c 80 jl 0xffffff91 11: 48 c7 c7 68 97 73 8e mov $0xffffffff8e739768,%rdi 18: e8 2c b5 83 00 call 0x83b549 1d: e9 6f ff ff ff jmp 0xffffff91 22: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) * 29: 41 56 push %r14 <-- trapping instruction 2b: 53 push %rbx 2c: 89 fb mov %edi,%ebx 2e: 48 c7 c0 60 e1 c8 91 mov $0xffffffff91c8e160,%rax 35: 48 c1 e8 03 shr $0x3,%rax 39: 49 rex.WB 3a: be 00 00 00 00 mov $0x0,%esi