================================================================== BUG: KASAN: slab-use-after-free in advance_sched+0xa70/0xac0 net/sched/sch_taprio.c:942 Read of size 8 at addr ffff0000ca9db910 by task syz-executor.2/6625 CPU: 0 UID: 0 PID: 6625 Comm: syz-executor.2 Not tainted 6.11.0-rc7-syzkaller-00105-g5f5673607153 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:319 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:326 __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x198/0x538 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 advance_sched+0xa70/0xac0 net/sched/sch_taprio.c:942 __run_hrtimer kernel/time/hrtimer.c:1689 [inline] __hrtimer_run_queues+0x494/0xce0 kernel/time/hrtimer.c:1753 hrtimer_interrupt+0x2c0/0xb64 kernel/time/hrtimer.c:1815 timer_handler drivers/clocksource/arm_arch_timer.c:674 [inline] arch_timer_handler_virt+0x74/0x88 drivers/clocksource/arm_arch_timer.c:685 handle_percpu_devid_irq+0x174/0x308 kernel/irq/chip.c:942 generic_handle_irq_desc include/linux/irqdesc.h:173 [inline] handle_irq_desc kernel/irq/irqdesc.c:692 [inline] generic_handle_domain_irq+0x7c/0xc4 kernel/irq/irqdesc.c:748 __gic_handle_irq drivers/irqchip/irq-gic-v3.c:843 [inline] __gic_handle_irq_from_irqson drivers/irqchip/irq-gic-v3.c:894 [inline] gic_handle_irq+0x6c/0x190 drivers/irqchip/irq-gic-v3.c:938 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:889 do_interrupt_handler+0xd4/0x138 arch/arm64/kernel/entry-common.c:310 __el1_irq arch/arm64/kernel/entry-common.c:536 [inline] el1_interrupt+0x34/0x68 arch/arm64/kernel/entry-common.c:551 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:556 el1h_64_irq+0x64/0x68 arch/arm64/kernel/entry.S:594 __daif_local_irq_restore arch/arm64/include/asm/irqflags.h:175 [inline] arch_local_irq_restore arch/arm64/include/asm/irqflags.h:195 [inline] seqcount_lockdep_reader_access include/linux/seqlock.h:74 [inline] get_counters net/ipv4/netfilter/ip_tables.c:757 [inline] alloc_counters+0x2e4/0x580 net/ipv4/netfilter/ip_tables.c:804 copy_entries_to_user net/ipv4/netfilter/arp_tables.c:681 [inline] get_entries net/ipv4/netfilter/arp_tables.c:867 [inline] do_arpt_get_ctl+0xb84/0x159c net/ipv4/netfilter/arp_tables.c:1461 nf_getsockopt+0x264/0x284 net/netfilter/nf_sockopt.c:116 ip_getsockopt+0x1d0/0x380 net/ipv4/ip_sockglue.c:1777 tcp_getsockopt+0xcc/0xe8 net/ipv4/tcp.c:4409 sock_common_getsockopt+0xa8/0xc4 net/core/sock.c:3708 do_sock_getsockopt+0x390/0x5d8 net/socket.c:2386 __sys_getsockopt+0x120/0x19c net/socket.c:2415 __do_sys_getsockopt net/socket.c:2425 [inline] __se_sys_getsockopt net/socket.c:2422 [inline] __arm64_sys_getsockopt+0xb8/0xd4 net/socket.c:2422 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Allocated by task 10952: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:565 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __kmalloc_cache_noprof+0x244/0x374 mm/slub.c:4193 kmalloc_noprof include/linux/slab.h:681 [inline] kzalloc_noprof include/linux/slab.h:807 [inline] taprio_change+0xd54/0x2b98 net/sched/sch_taprio.c:1859 qdisc_change net/sched/sch_api.c:1417 [inline] tc_modify_qdisc+0x1474/0x1870 net/sched/sch_api.c:1747 rtnetlink_rcv_msg+0x630/0xa9c net/core/rtnetlink.c:6647 netlink_rcv_skb+0x214/0x3c4 net/netlink/af_netlink.c:2550 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6665 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x668/0x8a4 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x7a4/0xa8c net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x56c/0x840 net/socket.c:2597 ___sys_sendmsg net/socket.c:2651 [inline] __sys_sendmsg+0x26c/0x33c net/socket.c:2680 __do_sys_sendmsg net/socket.c:2689 [inline] __se_sys_sendmsg net/socket.c:2687 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2687 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Freed by task 6626: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:579 poison_slab_object+0x128/0x180 mm/kasan/common.c:240 __kasan_slab_free+0x3c/0x70 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2256 [inline] slab_free mm/slub.c:4477 [inline] kfree+0x154/0x3e0 mm/slub.c:4598 taprio_free_sched_cb+0x158/0x178 net/sched/sch_taprio.c:201 rcu_do_batch kernel/rcu/tree.c:2569 [inline] rcu_core+0x888/0x1b3c kernel/rcu/tree.c:2843 rcu_core_si+0x10/0x1c kernel/rcu/tree.c:2860 handle_softirqs+0x2e4/0xbfc kernel/softirq.c:554 __do_softirq+0x14/0x20 kernel/softirq.c:588 Last potentially related work creation: kasan_save_stack+0x40/0x6c mm/kasan/common.c:47 __kasan_record_aux_stack+0xd0/0xec mm/kasan/generic.c:541 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:551 __call_rcu_common kernel/rcu/tree.c:3106 [inline] call_rcu+0x104/0xb08 kernel/rcu/tree.c:3210 taprio_change+0x259c/0x2b98 net/sched/sch_taprio.c:1968 qdisc_change net/sched/sch_api.c:1417 [inline] tc_modify_qdisc+0x1474/0x1870 net/sched/sch_api.c:1747 rtnetlink_rcv_msg+0x630/0xa9c net/core/rtnetlink.c:6647 netlink_rcv_skb+0x214/0x3c4 net/netlink/af_netlink.c:2550 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6665 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x668/0x8a4 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x7a4/0xa8c net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x56c/0x840 net/socket.c:2597 ___sys_sendmsg net/socket.c:2651 [inline] __sys_sendmsg+0x26c/0x33c net/socket.c:2680 __do_sys_sendmsg net/socket.c:2689 [inline] __se_sys_sendmsg net/socket.c:2687 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2687 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 The buggy address belongs to the object at ffff0000ca9db800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 272 bytes inside of freed 512-byte region [ffff0000ca9db800, ffff0000ca9dba00) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10a9d8 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 05ffc00000000040 ffff0000c0001c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000001fdffffff 0000000000000000 head: 05ffc00000000040 ffff0000c0001c80 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000001fdffffff 0000000000000000 head: 05ffc00000000002 fffffdffc32a7601 ffffffffffffffff 0000000000000000 head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000ca9db800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000ca9db880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000ca9db900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000ca9db980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000ca9dba00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================