================================================================== BUG: KASAN: slab-use-after-free in __update_min_deadline kernel/sched/fair.c:805 [inline] BUG: KASAN: slab-use-after-free in min_deadline_update kernel/sched/fair.c:819 [inline] BUG: KASAN: slab-use-after-free in min_deadline_cb_propagate kernel/sched/fair.c:825 [inline] BUG: KASAN: slab-use-after-free in reweight_entity+0x8e3/0xa60 kernel/sched/fair.c:3660 Read of size 8 at addr ffff888078649e70 by task syz-executor.0/5403 CPU: 0 PID: 5403 Comm: syz-executor.0 Not tainted 6.6.0-rc6-syzkaller-00217-gcd8892c07876 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 __update_min_deadline kernel/sched/fair.c:805 [inline] min_deadline_update kernel/sched/fair.c:819 [inline] min_deadline_cb_propagate kernel/sched/fair.c:825 [inline] reweight_entity+0x8e3/0xa60 kernel/sched/fair.c:3660 entity_tick kernel/sched/fair.c:5317 [inline] task_tick_fair+0xee/0xcd0 kernel/sched/fair.c:12392 scheduler_tick+0x210/0x650 kernel/sched/core.c:5657 update_process_times+0x19f/0x220 kernel/time/timer.c:2076 tick_sched_handle+0x8e/0x170 kernel/time/tick-sched.c:254 tick_sched_timer+0xe9/0x110 kernel/time/tick-sched.c:1492 __run_hrtimer kernel/time/hrtimer.c:1688 [inline] __hrtimer_run_queues+0x647/0xc10 kernel/time/hrtimer.c:1752 hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1814 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1063 [inline] __sysvec_apic_timer_interrupt+0x105/0x3f0 arch/x86/kernel/apic/apic.c:1080 sysvec_apic_timer_interrupt+0x42/0xc0 arch/x86/kernel/apic/apic.c:1074 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645 RIP: 0010:nf_confirm+0x0/0x1200 net/netfilter/nf_conntrack_proto.c:137 Code: 16 ef ff ff 48 89 ef be 02 00 00 00 e8 09 ef ff ff be 0a 00 00 00 48 89 ef e8 fc ee ff ff e9 f2 fe ff ff 0f 1f 80 00 00 00 00 0f 1e fa 41 57 41 56 41 55 49 89 d5 41 54 49 bc 00 00 00 00 00 RSP: 0018:ffffc90000007438 EFLAGS: 00000246 RAX: 1ffff110289d4441 RBX: ffff888144ea2200 RCX: 0000000000000100 RDX: ffffc900000074b8 RSI: ffff888026938780 RDI: 0000000000000000 RBP: ffff888144ea2200 R08: 0000000000000004 R09: 0000000000000000 R10: 0000000000000001 R11: ffffffff81dd8a45 R12: 0000000000000000 R13: ffffffff88741a70 R14: ffff888144ea2200 R15: dffffc0000000000 nf_hook_entry_hookfn include/linux/netfilter.h:144 [inline] nf_hook_slow+0xbf/0x1e0 net/netfilter/core.c:626 nf_hook include/linux/netfilter.h:259 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] ip_local_deliver+0x2de/0x550 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:468 [inline] ip_sublist_rcv_finish+0x99/0x2d0 net/ipv4/ip_input.c:580 ip_list_rcv_finish.constprop.0+0x560/0x720 net/ipv4/ip_input.c:631 ip_sublist_rcv net/ipv4/ip_input.c:639 [inline] ip_list_rcv+0x331/0x440 net/ipv4/ip_input.c:674 __netif_receive_skb_list_ptype net/core/dev.c:5595 [inline] __netif_receive_skb_list_core+0x52c/0x8a0 net/core/dev.c:5643 __netif_receive_skb_list net/core/dev.c:5695 [inline] netif_receive_skb_list_internal+0x769/0xe00 net/core/dev.c:5786 gro_normal_list include/net/gro.h:439 [inline] gro_normal_one include/net/gro.h:452 [inline] napi_skb_finish net/core/gro.c:579 [inline] napi_gro_receive+0x8ac/0xab0 net/core/gro.c:609 receive_buf+0xbc2/0x5420 drivers/net/virtio_net.c:1802 virtnet_receive drivers/net/virtio_net.c:2076 [inline] virtnet_poll+0x9cb/0x1630 drivers/net/virtio_net.c:2148 __napi_poll.constprop.0+0xb4/0x530 net/core/dev.c:6556 napi_poll net/core/dev.c:6623 [inline] net_rx_action+0x956/0xe90 net/core/dev.c:6756 __do_softirq+0x218/0x965 kernel/softirq.c:553 invoke_softirq kernel/softirq.c:427 [inline] __irq_exit_rcu kernel/softirq.c:632 [inline] irq_exit_rcu+0xb7/0x120 kernel/softirq.c:644 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1074 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645 RIP: 0010:kasan_check_range+0x12/0x190 mm/kasan/generic.c:186 Code: 54 de ff ff 89 43 08 5b 5d 41 5c c3 66 66 2e 0f 1f 84 00 00 00 00 00 90 66 0f 1f 00 48 85 f6 0f 84 48 01 00 00 48 89 f8 41 54 <44> 0f b6 c2 48 01 f0 55 53 0f 82 c6 00 00 00 48 b8 ff ff ff ff ff RSP: 0018:ffffc90004f97690 EFLAGS: 00000202 RAX: ffffea0000d26780 RBX: ffffea0000d26780 RCX: ffffffff81d49337 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffea0000d26780 RBP: ffffea0000d26780 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 1ffffffff1976ca1 R12: ffffea0000d26748 R13: dffffc0000000000 R14: ffff888027314010 R15: ffff888027314008 instrument_atomic_read include/linux/instrumented.h:68 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] folio_test_swapbacked include/linux/page-flags.h:495 [inline] folio_test_swapcache include/linux/page-flags.h:537 [inline] free_swap_cache+0x77/0x3d0 mm/swap_state.c:288 free_pages_and_swap_cache+0x60/0xa0 mm/swap_state.c:314 tlb_batch_pages_flush+0x9a/0x190 mm/mmu_gather.c:98 zap_pte_range mm/memory.c:1534 [inline] zap_pmd_range mm/memory.c:1573 [inline] zap_pud_range mm/memory.c:1602 [inline] zap_p4d_range mm/memory.c:1623 [inline] unmap_page_range+0x19b7/0x2c10 mm/memory.c:1644 unmap_single_vma+0x194/0x2b0 mm/memory.c:1690 unmap_vmas+0x1e2/0x330 mm/memory.c:1731 exit_mmap+0x1ad/0xa60 mm/mmap.c:3210 __mmput+0x12a/0x4d0 kernel/fork.c:1349 mmput+0x62/0x70 kernel/fork.c:1371 exit_mm kernel/exit.c:567 [inline] do_exit+0x9ad/0x2a20 kernel/exit.c:861 do_group_exit+0xd4/0x2a0 kernel/exit.c:1024 get_signal+0x23ba/0x2790 kernel/signal.c:2892 arch_do_signal_or_restart+0x90/0x7f0 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x11f/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296 do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f608f27cae9 Code: Unable to access opcode bytes at 0x7f608f27cabf. RSP: 002b:00007f608ddbc078 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: fffffffffffffff4 RBX: 00007f608f39c120 RCX: 00007f608f27cae9 RDX: 0000000020000340 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f608f2c847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f608f39c120 R15: 00007ffd8799b708 Allocated by task 4706: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slub.c:3478 [inline] kmem_cache_alloc_node+0x180/0x3f0 mm/slub.c:3523 alloc_task_struct_node kernel/fork.c:173 [inline] dup_task_struct kernel/fork.c:1110 [inline] copy_process+0x41c/0x73f0 kernel/fork.c:2327 kernel_clone+0xfd/0x920 kernel/fork.c:2909 __do_sys_clone+0xba/0x100 kernel/fork.c:3052 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5033: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] kmem_cache_free+0xf0/0x480 mm/slub.c:3831 put_task_struct include/linux/sched/task.h:136 [inline] put_task_struct include/linux/sched/task.h:123 [inline] delayed_put_task_struct+0x21b/0x2b0 kernel/exit.c:226 rcu_do_batch kernel/rcu/tree.c:2139 [inline] rcu_core+0x805/0x1bb0 kernel/rcu/tree.c:2403 __do_softirq+0x218/0x965 kernel/softirq.c:553 Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 __call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:2653 put_task_struct_rcu_user kernel/exit.c:232 [inline] put_task_struct_rcu_user+0x87/0xc0 kernel/exit.c:229 context_switch kernel/sched/core.c:5385 [inline] __schedule+0xee9/0x5a10 kernel/sched/core.c:6695 preempt_schedule_common+0x45/0xc0 kernel/sched/core.c:6864 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk_64.S:45 __raw_spin_unlock include/linux/spinlock_api_smp.h:143 [inline] _raw_spin_unlock+0x3a/0x40 kernel/locking/spinlock.c:186 spin_unlock include/linux/spinlock.h:391 [inline] zap_pte_range mm/memory.c:1525 [inline] zap_pmd_range mm/memory.c:1573 [inline] zap_pud_range mm/memory.c:1602 [inline] zap_p4d_range mm/memory.c:1623 [inline] unmap_page_range+0x1475/0x2c10 mm/memory.c:1644 unmap_single_vma+0x194/0x2b0 mm/memory.c:1690 unmap_vmas+0x1e2/0x330 mm/memory.c:1731 exit_mmap+0x1ad/0xa60 mm/mmap.c:3210 __mmput+0x12a/0x4d0 kernel/fork.c:1349 mmput+0x62/0x70 kernel/fork.c:1371 exit_mm kernel/exit.c:567 [inline] do_exit+0x9ad/0x2a20 kernel/exit.c:861 do_group_exit+0xd4/0x2a0 kernel/exit.c:1024 __do_sys_exit_group kernel/exit.c:1035 [inline] __se_sys_exit_group kernel/exit.c:1033 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1033 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888078649dc0 which belongs to the cache task_struct of size 7360 The buggy address is located 176 bytes inside of freed 7360-byte region [ffff888078649dc0, ffff88807864ba80) The buggy address belongs to the physical page: page:ffffea0001e19200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x78648 head:ffffea0001e19200 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888073a6b2c1 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888014e43500 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000040004 00000001ffffffff ffff888073a6b2c1 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 4706, tgid 4706 (dhcpcd), ts 265502745606, free_ts 259643516593 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] kmem_cache_alloc_node+0x132/0x3f0 mm/slub.c:3523 alloc_task_struct_node kernel/fork.c:173 [inline] dup_task_struct kernel/fork.c:1110 [inline] copy_process+0x41c/0x73f0 kernel/fork.c:2327 kernel_clone+0xfd/0x920 kernel/fork.c:2909 __do_sys_clone+0xba/0x100 kernel/fork.c:3052 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 __unfreeze_partials+0x21d/0x240 mm/slub.c:2655 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slub.c:3478 [inline] kmem_cache_alloc_node+0x180/0x3f0 mm/slub.c:3523 __alloc_skb+0x287/0x330 net/core/skbuff.c:640 alloc_skb include/linux/skbuff.h:1286 [inline] alloc_skb_with_frags+0xe4/0x710 net/core/skbuff.c:6313 sock_alloc_send_pskb+0x7e4/0x970 net/core/sock.c:2795 sock_alloc_send_skb include/net/sock.h:1883 [inline] mld_newpack.isra.0+0x1ee/0x790 net/ipv6/mcast.c:1746 add_grhead+0x295/0x340 net/ipv6/mcast.c:1849 add_grec+0x10bb/0x1680 net/ipv6/mcast.c:1987 mld_send_cr net/ipv6/mcast.c:2113 [inline] mld_ifc_work+0x41f/0xcd0 net/ipv6/mcast.c:2651 process_one_work+0x884/0x15c0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 Memory state around the buggy address: ffff888078649d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888078649d80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff888078649e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888078649e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888078649f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess), 3 bytes skipped: 0: ff 48 89 decl -0x77(%rax) 3: ef out %eax,(%dx) 4: be 02 00 00 00 mov $0x2,%esi 9: e8 09 ef ff ff call 0xffffef17 e: be 0a 00 00 00 mov $0xa,%esi 13: 48 89 ef mov %rbp,%rdi 16: e8 fc ee ff ff call 0xffffef17 1b: e9 f2 fe ff ff jmp 0xffffff12 20: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) * 27: f3 0f 1e fa endbr64 <-- trapping instruction 2b: 41 57 push %r15 2d: 41 56 push %r14 2f: 41 55 push %r13 31: 49 89 d5 mov %rdx,%r13 34: 41 54 push %r12 36: 49 rex.WB 37: bc 00 00 00 00 mov $0x0,%esp