================================================================== BUG: KASAN: slab-use-after-free in taprio_dump_tc_entries net/sched/sch_taprio.c:2275 [inline] BUG: KASAN: slab-use-after-free in taprio_dump+0xb32/0xc80 net/sched/sch_taprio.c:2323 Read of size 4 at addr ffff88802bf574c0 by task syz-executor.0/19511 CPU: 1 PID: 19511 Comm: syz-executor.0 Not tainted 6.4.0-rc3-syzkaller-g9d646009f65d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 taprio_dump_tc_entries net/sched/sch_taprio.c:2275 [inline] taprio_dump+0xb32/0xc80 net/sched/sch_taprio.c:2323 tc_fill_qdisc+0x60b/0x1290 net/sched/sch_api.c:946 qdisc_notify.isra.0+0x2c7/0x330 net/sched/sch_api.c:1018 tc_modify_qdisc+0x1019/0x1aa0 net/sched/sch_api.c:1655 rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6395 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2546 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 sock_no_sendpage+0x10c/0x160 net/core/sock.c:3230 kernel_sendpage.part.0+0x1d5/0x700 net/socket.c:3582 kernel_sendpage net/socket.c:3579 [inline] sock_sendpage+0xe7/0x180 net/socket.c:1082 pipe_to_sendpage+0x2b1/0x380 fs/splice.c:471 splice_from_pipe_feed fs/splice.c:525 [inline] __splice_from_pipe+0x449/0x8a0 fs/splice.c:669 splice_from_pipe fs/splice.c:704 [inline] generic_splice_sendpage+0xd8/0x140 fs/splice.c:852 do_splice_from fs/splice.c:873 [inline] do_splice+0xb8c/0x1e50 fs/splice.c:1182 __do_splice+0x14e/0x270 fs/splice.c:1260 __do_sys_splice fs/splice.c:1471 [inline] __se_sys_splice fs/splice.c:1453 [inline] __x64_sys_splice+0x19c/0x250 fs/splice.c:1453 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f913d488a39 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f913e68c188 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007f913d58bf60 RCX: 00007f913d488a39 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007f913d4e2c5f R08: 0000000000010976 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe14675ddf R14: 00007f913e68c300 R15: 0000000000022000 Allocated by task 19491: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] ____kasan_kmalloc mm/kasan/common.c:333 [inline] __kasan_kmalloc+0xa3/0xb0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:680 [inline] taprio_change+0x612/0x4920 net/sched/sch_taprio.c:1864 qdisc_change net/sched/sch_api.c:1358 [inline] tc_modify_qdisc+0xe90/0x1aa0 net/sched/sch_api.c:1653 rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6395 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2546 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 sock_no_sendpage+0x10c/0x160 net/core/sock.c:3230 kernel_sendpage.part.0+0x1d5/0x700 net/socket.c:3582 kernel_sendpage net/socket.c:3579 [inline] sock_sendpage+0xe7/0x180 net/socket.c:1082 pipe_to_sendpage+0x2b1/0x380 fs/splice.c:471 splice_from_pipe_feed fs/splice.c:525 [inline] __splice_from_pipe+0x449/0x8a0 fs/splice.c:669 splice_from_pipe fs/splice.c:704 [inline] generic_splice_sendpage+0xd8/0x140 fs/splice.c:852 do_splice_from fs/splice.c:873 [inline] do_splice+0xb8c/0x1e50 fs/splice.c:1182 __do_splice+0x14e/0x270 fs/splice.c:1260 __do_sys_splice fs/splice.c:1471 [inline] __se_sys_splice fs/splice.c:1453 [inline] __x64_sys_splice+0x19c/0x250 fs/splice.c:1453 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 14: kasan_save_stack+0x22/0x40 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:521 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x13b/0x1a0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:162 [inline] __cache_free mm/slab.c:3389 [inline] __do_kmem_cache_free mm/slab.c:3576 [inline] __kmem_cache_free+0xcd/0x2c0 mm/slab.c:3583 rcu_do_batch kernel/rcu/tree.c:2115 [inline] rcu_core+0x806/0x1ad0 kernel/rcu/tree.c:2377 __do_softirq+0x1d4/0x905 kernel/softirq.c:571 Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0x7b/0x90 mm/kasan/generic.c:491 __call_rcu_common.constprop.0+0x99/0x7e0 kernel/rcu/tree.c:2627 taprio_change+0x32db/0x4920 net/sched/sch_taprio.c:1974 qdisc_change net/sched/sch_api.c:1358 [inline] tc_modify_qdisc+0xe90/0x1aa0 net/sched/sch_api.c:1653 rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6395 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2546 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 sock_no_sendpage+0x10c/0x160 net/core/sock.c:3230 kernel_sendpage.part.0+0x1d5/0x700 net/socket.c:3582 kernel_sendpage net/socket.c:3579 [inline] sock_sendpage+0xe7/0x180 net/socket.c:1082 pipe_to_sendpage+0x2b1/0x380 fs/splice.c:471 splice_from_pipe_feed fs/splice.c:525 [inline] __splice_from_pipe+0x449/0x8a0 fs/splice.c:669 splice_from_pipe fs/splice.c:704 [inline] generic_splice_sendpage+0xd8/0x140 fs/splice.c:852 do_splice_from fs/splice.c:873 [inline] do_splice+0xb8c/0x1e50 fs/splice.c:1182 __do_splice+0x14e/0x270 fs/splice.c:1260 __do_sys_splice fs/splice.c:1471 [inline] __se_sys_splice fs/splice.c:1453 [inline] __x64_sys_splice+0x19c/0x250 fs/splice.c:1453 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0x7b/0x90 mm/kasan/generic.c:491 __call_rcu_common.constprop.0+0x99/0x7e0 kernel/rcu/tree.c:2627 taprio_change+0x32db/0x4920 net/sched/sch_taprio.c:1974 qdisc_change net/sched/sch_api.c:1358 [inline] tc_modify_qdisc+0xe90/0x1aa0 net/sched/sch_api.c:1653 rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6395 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2546 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 sock_no_sendpage+0x10c/0x160 net/core/sock.c:3230 kernel_sendpage.part.0+0x1d5/0x700 net/socket.c:3582 kernel_sendpage net/socket.c:3579 [inline] sock_sendpage+0xe7/0x180 net/socket.c:1082 pipe_to_sendpage+0x2b1/0x380 fs/splice.c:471 splice_from_pipe_feed fs/splice.c:525 [inline] __splice_from_pipe+0x449/0x8a0 fs/splice.c:669 splice_from_pipe fs/splice.c:704 [inline] generic_splice_sendpage+0xd8/0x140 fs/splice.c:852 do_splice_from fs/splice.c:873 [inline] do_splice+0xb8c/0x1e50 fs/splice.c:1182 __do_splice+0x14e/0x270 fs/splice.c:1260 __do_sys_splice fs/splice.c:1471 [inline] __se_sys_splice fs/splice.c:1453 [inline] __x64_sys_splice+0x19c/0x250 fs/splice.c:1453 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88802bf57400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 192 bytes inside of freed 512-byte region [ffff88802bf57400, ffff88802bf57600) The buggy address belongs to the physical page: page:ffffea0000afd5c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2bf57 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0x4() raw: 00fff00000000200 ffff888012440600 ffffea0001e7b210 ffffea0001d8d350 raw: 0000000000000000 ffff88802bf57000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x3420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 5356, tgid 5356 (syz-executor.0), ts 95084851375, free_ts 95076186655 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3502 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4768 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1360 [inline] cache_grow_begin+0x9b/0x3b0 mm/slab.c:2569 cache_alloc_refill+0x27f/0x380 mm/slab.c:2942 ____cache_alloc mm/slab.c:3018 [inline] ____cache_alloc mm/slab.c:3001 [inline] __do_cache_alloc mm/slab.c:3201 [inline] slab_alloc_node mm/slab.c:3249 [inline] __kmem_cache_alloc_node+0x360/0x3f0 mm/slab.c:3540 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1057 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:680 [inline] fib6_info_alloc+0xc9/0x220 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x341/0x1980 net/ipv6/route.c:3741 ip6_route_add+0x28/0x150 net/ipv6/route.c:3835 addrconf_prefix_route+0x309/0x520 net/ipv6/addrconf.c:2425 add_v4_addrs+0x697/0x930 net/ipv6/addrconf.c:3169 addrconf_gre_config net/ipv6/addrconf.c:3443 [inline] addrconf_init_auto_addrs+0x18f/0x8a0 net/ipv6/addrconf.c:3461 addrconf_notify+0x10a7/0x19f0 net/ipv6/addrconf.c:3642 notifier_call_chain+0xb6/0x3c0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1935 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2564 free_unref_page+0x33/0x370 mm/page_alloc.c:2659 slab_destroy mm/slab.c:1612 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1632 cache_flusharray mm/slab.c:3360 [inline] ___cache_free+0x2ae/0x3d0 mm/slab.c:3423 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x4f/0x1a0 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x195/0x220 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:711 [inline] slab_alloc_node mm/slab.c:3256 [inline] kmem_cache_alloc_node+0x296/0x510 mm/slab.c:3528 __alloc_skb+0x288/0x330 net/core/skbuff.c:644 alloc_skb include/linux/skbuff.h:1288 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1211 [inline] netlink_sendmsg+0x9b0/0xe30 net/netlink/af_netlink.c:1888 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 __sys_sendto+0x23a/0x340 net/socket.c:2144 __do_sys_sendto net/socket.c:2156 [inline] __se_sys_sendto net/socket.c:2152 [inline] __x64_sys_sendto+0xe1/0x1b0 net/socket.c:2152 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88802bf57380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802bf57400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88802bf57480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802bf57500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802bf57580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================