================================================================== BUG: KASAN: use-after-free in tcp_probe_timer net/ipv4/tcp_timer.c:388 [inline] BUG: KASAN: use-after-free in tcp_write_timer_handler+0x6ec/0x808 net/ipv4/tcp_timer.c:652 Read of size 1 at addr ffff0000ed8f8745 by task syz-executor.2/14642 CPU: 1 PID: 14642 Comm: syz-executor.2 Not tainted 6.1.83-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_load1_noabort+0x2c/0x38 mm/kasan/report_generic.c:348 tcp_probe_timer net/ipv4/tcp_timer.c:388 [inline] tcp_write_timer_handler+0x6ec/0x808 net/ipv4/tcp_timer.c:652 tcp_write_timer+0x170/0x2e4 net/ipv4/tcp_timer.c:665 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+0x8/0x10 arch/arm64/include/asm/irqflags.h:122 lock_is_held include/linux/lockdep.h:283 [inline] task_css include/linux/cgroup.h:509 [inline] mem_cgroup_from_task+0x64/0x120 mm/memcontrol.c:985 count_memcg_event_mm+0x128/0x318 include/linux/memcontrol.h:1096 handle_mm_fault+0x1bc/0x3ef0 mm/memory.c:5254 __do_page_fault arch/arm64/mm/fault.c:499 [inline] do_page_fault+0x330/0x890 arch/arm64/mm/fault.c:583 do_translation_fault+0x94/0xc8 arch/arm64/mm/fault.c:667 do_mem_abort+0x74/0x200 arch/arm64/mm/fault.c:803 el0_da+0x70/0x184 arch/arm64/kernel/entry-common.c:515 el0t_64_sync_handler+0xcc/0xf0 arch/arm64/kernel/entry-common.c:658 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Allocated by task 4236: 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 The buggy address belongs to the object at ffff0000ed8f8000 which belongs to the cache net_namespace of size 6976 The buggy address is located 1861 bytes inside of 6976-byte region [ffff0000ed8f8000, ffff0000ed8f9b40) The buggy address belongs to the physical page: page:00000000ba6cf9a0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000ed8f8000 pfn:0x12d8f8 head:00000000ba6cf9a0 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc0003623600 dead000000000002 ffff0000c03de180 raw: ffff0000ed8f8000 0000000080040003 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000ed8f8600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000ed8f8680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000ed8f8700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000ed8f8780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000ed8f8800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== IPv4: Oversized IP packet from 172.20.20.24 IPv4: Oversized IP packet from 172.20.20.24