================================================================== BUG: KASAN: slab-use-after-free in advance_sched+0xc07/0xc60 net/sched/sch_taprio.c:942 Read of size 8 at addr ffff88801f65f510 by task syz-executor.0/5975 CPU: 1 PID: 5975 Comm: syz-executor.0 Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 advance_sched+0xc07/0xc60 net/sched/sch_taprio.c:942 __run_hrtimer kernel/time/hrtimer.c:1692 [inline] __hrtimer_run_queues+0x20c/0xc20 kernel/time/hrtimer.c:1756 hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1818 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline] __sysvec_apic_timer_interrupt+0x10f/0x410 arch/x86/kernel/apic/apic.c:1049 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x43/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0033:0x7fb7bca39994 Code: 84 00 00 00 00 00 48 8b 4b 08 48 83 c3 08 48 39 d1 72 f3 48 83 e8 08 48 39 f2 73 17 66 2e 0f 1f 84 00 00 00 00 00 48 8b 70 f8 <48> 83 e8 08 48 39 f2 72 f3 48 39 c3 73 3e 48 89 33 48 83 c3 08 48 RSP: 002b:00007ffca79cc400 EFLAGS: 00000293 RAX: 00007fb7bc269b38 RBX: 00007fb7bc2590e0 RCX: ffffffff813c9472 RDX: ffffffff813c90b0 RSI: ffffffff813c9472 RDI: 00007fb7bc26e250 RBP: 00007fb7bc255390 R08: 00007fb7bc261ae8 R09: 000000000000097c R10: 000000008ad249d8 R11: 0000000000000246 R12: 00007fb7bc255388 R13: 0000000000000016 R14: 00007fb7bcba0000 R15: 00007fb7bcbac018 Allocated by task 5976: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kmalloc include/linux/slab.h:628 [inline] kzalloc include/linux/slab.h:749 [inline] taprio_change+0x516/0x39b0 net/sched/sch_taprio.c:1861 taprio_init+0x6b1/0x940 net/sched/sch_taprio.c:2114 qdisc_create+0x4f3/0x10c0 net/sched/sch_api.c:1355 tc_modify_qdisc+0x4d8/0x1c40 net/sched/sch_api.c:1776 rtnetlink_rcv_msg+0x3c7/0xe60 net/core/rtnetlink.c:6595 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2559 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0x542/0x820 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0xab5/0xc90 net/socket.c:2584 ___sys_sendmsg+0x135/0x1e0 net/socket.c:2638 __sys_sendmmsg+0x1a1/0x450 net/socket.c:2724 __do_sys_sendmmsg net/socket.c:2753 [inline] __se_sys_sendmmsg net/socket.c:2750 [inline] __x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2750 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd2/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6d/0x75 Freed by task 5978: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:240 [inline] __kasan_slab_free+0x11d/0x1a0 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kfree+0x129/0x370 mm/slub.c:4390 rcu_do_batch kernel/rcu/tree.c:2196 [inline] rcu_core+0x828/0x16b0 kernel/rcu/tree.c:2471 __do_softirq+0x218/0x8de kernel/softirq.c:554 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:541 __call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:2734 taprio_change+0x2908/0x39b0 net/sched/sch_taprio.c:1971 qdisc_change net/sched/sch_api.c:1416 [inline] tc_modify_qdisc+0x7dc/0x1c40 net/sched/sch_api.c:1746 rtnetlink_rcv_msg+0x3c7/0xe60 net/core/rtnetlink.c:6595 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2559 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0x542/0x820 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0xab5/0xc90 net/socket.c:2584 ___sys_sendmsg+0x135/0x1e0 net/socket.c:2638 __sys_sendmmsg+0x1a1/0x450 net/socket.c:2724 __do_sys_sendmmsg net/socket.c:2753 [inline] __se_sys_sendmmsg net/socket.c:2750 [inline] __x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2750 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd2/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6d/0x75 The buggy address belongs to the object at ffff88801f65f400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 272 bytes inside of freed 512-byte region [ffff88801f65f400, ffff88801f65f600) The buggy address belongs to the physical page: page:ffffea00007d9700 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1f65c head:ffffea00007d9700 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888015041c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5137, tgid 5137 (kworker/1:6), ts 91075475322, free_ts 90461289878 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22b/0x2410 mm/page_alloc.c:4569 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2175 [inline] allocate_slab mm/slub.c:2338 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2391 ___slab_alloc+0x66d/0x1790 mm/slub.c:3525 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3610 __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] __do_kmalloc_node mm/slub.c:3965 [inline] __kmalloc+0x3b4/0x440 mm/slub.c:3979 kmalloc include/linux/slab.h:632 [inline] kzalloc include/linux/slab.h:749 [inline] fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x337/0x1940 net/ipv6/route.c:3759 addrconf_f6i_alloc+0x393/0x670 net/ipv6/route.c:4583 ipv6_add_addr+0x538/0x2090 net/ipv6/addrconf.c:1119 addrconf_add_linklocal+0x2a6/0x650 net/ipv6/addrconf.c:3312 addrconf_addr_gen+0x36f/0x3c0 net/ipv6/addrconf.c:3443 addrconf_dev_config net/ipv6/addrconf.c:3489 [inline] addrconf_init_auto_addrs+0x446/0x820 net/ipv6/addrconf.c:3567 addrconf_notify+0x6ef/0x19e0 net/ipv6/addrconf.c:3740 notifier_call_chain+0xb9/0x3e0 kernel/notifier.c:93 page last free pid 23 tgid 23 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2346 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2486 rcu_do_batch kernel/rcu/tree.c:2196 [inline] rcu_core+0x828/0x16b0 kernel/rcu/tree.c:2471 __do_softirq+0x218/0x8de kernel/softirq.c:554 Memory state around the buggy address: ffff88801f65f400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801f65f480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801f65f500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801f65f580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801f65f600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================