================================================================== BUG: KASAN: slab-out-of-bounds in taprio_dequeue_from_txq+0x835/0x940 net/sched/sch_taprio.c:714 Read of size 8 at addr ffff88804e8d4c80 by task syz-fuzzer/5033 CPU: 0 PID: 5033 Comm: syz-fuzzer Not tainted 6.4.0-rc4-syzkaller-00099-g1874a42a7d74 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/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_dequeue_from_txq+0x835/0x940 net/sched/sch_taprio.c:714 taprio_dequeue_tc_priority+0x277/0x450 net/sched/sch_taprio.c:795 taprio_dequeue+0x12c/0x5e0 net/sched/sch_taprio.c:862 dequeue_skb net/sched/sch_generic.c:292 [inline] qdisc_restart net/sched/sch_generic.c:397 [inline] __qdisc_run+0x1b2/0x1780 net/sched/sch_generic.c:415 __dev_xmit_skb net/core/dev.c:3868 [inline] __dev_queue_xmit+0x2215/0x3b10 net/core/dev.c:4210 dev_queue_xmit include/linux/netdevice.h:3085 [inline] br_dev_queue_push_xmit+0x26e/0x7b0 net/bridge/br_forward.c:53 br_nf_dev_queue_xmit+0x5f9/0x1e80 net/bridge/br_netfilter_hooks.c:810 NF_HOOK include/linux/netfilter.h:303 [inline] NF_HOOK include/linux/netfilter.h:297 [inline] br_nf_post_routing+0x9f8/0x1200 net/bridge/br_netfilter_hooks.c:856 nf_hook_entry_hookfn include/linux/netfilter.h:143 [inline] nf_hook_slow+0xc9/0x1f0 net/netfilter/core.c:626 nf_hook+0x431/0x730 include/linux/netfilter.h:258 NF_HOOK include/linux/netfilter.h:301 [inline] br_forward_finish+0xd8/0x130 net/bridge/br_forward.c:66 br_nf_hook_thresh+0x2fb/0x3f0 net/bridge/br_netfilter_hooks.c:1048 br_nf_forward_finish+0x6df/0xa30 net/bridge/br_netfilter_hooks.c:567 NF_HOOK include/linux/netfilter.h:303 [inline] NF_HOOK include/linux/netfilter.h:297 [inline] br_nf_forward_ip net/bridge/br_netfilter_hooks.c:637 [inline] br_nf_forward_ip+0xb83/0x13c0 net/bridge/br_netfilter_hooks.c:578 nf_hook_entry_hookfn include/linux/netfilter.h:143 [inline] nf_hook_slow+0xc9/0x1f0 net/netfilter/core.c:626 nf_hook+0x431/0x730 include/linux/netfilter.h:258 NF_HOOK include/linux/netfilter.h:301 [inline] __br_forward+0x19a/0x570 net/bridge/br_forward.c:115 deliver_clone net/bridge/br_forward.c:131 [inline] maybe_deliver+0x350/0x450 net/bridge/br_forward.c:189 br_flood+0x168/0x470 net/bridge/br_forward.c:233 br_handle_frame_finish+0xf89/0x1de0 net/bridge/br_input.c:210 br_nf_hook_thresh+0x2fb/0x3f0 net/bridge/br_netfilter_hooks.c:1048 br_nf_pre_routing_finish_ipv6+0x695/0xf30 net/bridge/br_netfilter_ipv6.c:148 NF_HOOK include/linux/netfilter.h:303 [inline] br_nf_pre_routing_ipv6+0x41b/0x830 net/bridge/br_netfilter_ipv6.c:178 br_nf_pre_routing+0xda4/0x1520 net/bridge/br_netfilter_hooks.c:508 nf_hook_entry_hookfn include/linux/netfilter.h:143 [inline] nf_hook_bridge_pre net/bridge/br_input.c:272 [inline] br_handle_frame+0x9cb/0x1320 net/bridge/br_input.c:416 __netif_receive_skb_core+0xa10/0x3900 net/core/dev.c:5385 __netif_receive_skb_one_core+0xae/0x180 net/core/dev.c:5489 __netif_receive_skb+0x1f/0x1c0 net/core/dev.c:5605 process_backlog+0x101/0x670 net/core/dev.c:5933 __napi_poll+0xb7/0x6f0 net/core/dev.c:6496 napi_poll net/core/dev.c:6563 [inline] net_rx_action+0x8a9/0xcb0 net/core/dev.c:6696 __do_softirq+0x1d4/0x905 kernel/softirq.c:571 do_softirq.part.0+0xde/0x130 kernel/softirq.c:472 do_softirq kernel/softirq.c:464 [inline] __local_bh_enable_ip+0x106/0x130 kernel/softirq.c:396 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:843 [inline] __dev_queue_xmit+0x1e20/0x3b10 net/core/dev.c:4271 dev_queue_xmit include/linux/netdevice.h:3085 [inline] neigh_hh_output include/net/neighbour.h:528 [inline] neigh_output include/net/neighbour.h:542 [inline] ip_finish_output2+0x15a1/0x22b0 net/ipv4/ip_output.c:229 __ip_finish_output net/ipv4/ip_output.c:307 [inline] __ip_finish_output+0x396/0x650 net/ipv4/ip_output.c:289 ip_finish_output+0x31/0x280 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:292 [inline] ip_output+0x1a3/0x320 net/ipv4/ip_output.c:431 dst_output include/net/dst.h:458 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] __ip_queue_xmit+0x8d9/0x1c50 net/ipv4/ip_output.c:533 __tcp_transmit_skb+0x194b/0x3800 net/ipv4/tcp_output.c:1399 tcp_transmit_skb net/ipv4/tcp_output.c:1417 [inline] tcp_write_xmit+0x1025/0x6160 net/ipv4/tcp_output.c:2693 __tcp_push_pending_frames+0xae/0x390 net/ipv4/tcp_output.c:2877 tcp_push+0x49d/0x720 net/ipv4/tcp.c:733 tcp_sendmsg_locked+0x1ff8/0x2960 net/ipv4/tcp.c:1459 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1487 inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:825 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 sock_write_iter+0x295/0x3d0 net/socket.c:1140 call_write_iter include/linux/fs.h:1868 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x945/0xd50 fs/read_write.c:584 ksys_write+0x1ec/0x250 fs/read_write.c:637 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:0x403ace Code: 48 89 6c 24 38 48 8d 6c 24 38 e8 0d 00 00 00 48 8b 6c 24 38 48 83 c4 40 c3 cc cc cc 49 89 f2 48 89 fa 48 89 ce 48 89 df 0f 05 <48> 3d 01 f0 ff ff 76 15 48 f7 d8 48 89 c1 48 c7 c0 ff ff ff ff 48 RSP: 002b:000000c00fd3f120 EFLAGS: 00000206 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000403ace RDX: 00000000000000f0 RSI: 000000c00022c200 RDI: 0000000000000003 RBP: 000000c00fd3f160 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 000000c00fd3f2a0 R13: 0000000000000000 R14: 000000c004d7a680 R15: 000000c0000ae900 Allocated by task 22867: 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+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc+0x5e/0x190 mm/slab_common.c:979 kmalloc_array include/linux/slab.h:596 [inline] kcalloc include/linux/slab.h:627 [inline] taprio_init+0x319/0x940 net/sched/sch_taprio.c:2086 qdisc_create+0x4d1/0x1040 net/sched/sch_api.c:1297 tc_modify_qdisc+0x488/0x1aa0 net/sched/sch_api.c:1682 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 ____sys_sendmsg+0x71c/0x900 net/socket.c:2503 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2557 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2586 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 Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 kvfree_call_rcu+0x70/0xad0 kernel/rcu/tree.c:3332 kernfs_unlink_open_file+0x3a4/0x4a0 fs/kernfs/file.c:633 kernfs_fop_release+0xeb/0x1e0 fs/kernfs/file.c:805 __fput+0x27c/0xa90 fs/file_table.c:321 task_work_run+0x16f/0x270 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:297 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 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+0xbc/0xd0 mm/kasan/generic.c:491 kvfree_call_rcu+0x70/0xad0 kernel/rcu/tree.c:3332 __hw_addr_flush+0x150/0x240 net/core/dev_addr_lists.c:490 dev_addr_flush+0x21/0x60 net/core/dev_addr_lists.c:535 free_netdev+0x1fe/0x620 net/core/dev.c:10750 netdev_run_todo+0xbdc/0x1100 net/core/dev.c:10394 default_device_exit_batch+0x456/0x5b0 net/core/dev.c:11392 ops_exit_list+0x125/0x170 net/core/net_namespace.c:175 setup_net+0x7fb/0xc50 net/core/net_namespace.c:362 copy_net_ns+0x4ee/0x8e0 net/core/net_namespace.c:491 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xc1/0x1f0 kernel/nsproxy.c:228 ksys_unshare+0x449/0x920 kernel/fork.c:3444 __do_sys_unshare kernel/fork.c:3515 [inline] __se_sys_unshare kernel/fork.c:3513 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:3513 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 ffff88804e8d4c00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 0 bytes to the right of allocated 128-byte region [ffff88804e8d4c00, ffff88804e8d4c80) The buggy address belongs to the physical page: page:ffffea00013a3500 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4e8d4 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff8880124418c0 ffffea00012397c0 dead000000000002 raw: 0000000000000000 0000000080100010 00000001ffffffff 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 0x12820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY), pid 5052, tgid 5052 (syz-executor.4), ts 122096791941, free_ts 26061012802 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+0x1aa/0x270 mm/mempolicy.c:2279 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x390 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3192 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3291 __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] __kmem_cache_alloc_node+0x136/0x320 mm/slub.c:3490 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1057 kmalloc include/linux/slab.h:559 [inline] __hw_addr_create net/core/dev_addr_lists.c:60 [inline] __hw_addr_add_ex+0x22d/0x7f0 net/core/dev_addr_lists.c:118 __dev_mc_add net/core/dev_addr_lists.c:867 [inline] dev_mc_add+0xc1/0x110 net/core/dev_addr_lists.c:885 igmp6_group_added+0x4f0/0x5b0 net/ipv6/mcast.c:680 __ipv6_dev_mc_inc+0x724/0xc60 net/ipv6/mcast.c:949 ipv6_add_dev+0xa98/0x13b0 net/ipv6/addrconf.c:465 addrconf_notify+0x63d/0x19f0 net/ipv6/addrconf.c:3552 notifier_call_chain+0xb6/0x3c0 kernel/notifier.c:93 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 free_contig_range+0xb5/0x180 mm/page_alloc.c:6994 destroy_args+0x6c4/0x920 mm/debug_vm_pgtable.c:1023 debug_vm_pgtable+0x2412/0x4210 mm/debug_vm_pgtable.c:1403 do_one_initcall+0x102/0x540 init/main.c:1246 do_initcall_level init/main.c:1319 [inline] do_initcalls init/main.c:1335 [inline] do_basic_setup init/main.c:1354 [inline] kernel_init_freeable+0x64e/0xba0 init/main.c:1571 kernel_init+0x1e/0x2c0 init/main.c:1462 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff88804e8d4b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804e8d4c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88804e8d4c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88804e8d4d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804e8d4d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================