================================================================== BUG: KASAN: use-after-free in dump_schedule+0x6d2/0x750 net/sched/sch_taprio.c:1848 Read of size 8 at addr ffff8880174079c0 by task syz-executor.1/8766 CPU: 1 PID: 8766 Comm: syz-executor.1 Not tainted 5.16.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x320 mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:450 dump_schedule+0x6d2/0x750 net/sched/sch_taprio.c:1848 taprio_dump+0x431/0xbd0 net/sched/sch_taprio.c:1917 tc_fill_qdisc+0x570/0xfa0 net/sched/sch_api.c:924 qdisc_notify.isra.0+0x229/0x2a0 net/sched/sch_api.c:990 tc_modify_qdisc+0xc4a/0x1630 net/sched/sch_api.c:1633 rtnetlink_rcv_msg+0x31d/0x8d0 net/core/rtnetlink.c:5571 netlink_rcv_skb+0x118/0x370 net/netlink/af_netlink.c:2496 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x42e/0x700 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x775/0xc10 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:724 sock_no_sendpage+0xea/0x130 net/core/sock.c:3080 kernel_sendpage.part.0+0x121/0x250 net/socket.c:3504 kernel_sendpage net/socket.c:3501 [inline] sock_sendpage+0xc7/0x1a0 net/socket.c:1003 pipe_to_sendpage+0x245/0x410 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x362/0x810 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xba/0x120 fs/splice.c:746 do_splice_from fs/splice.c:767 [inline] do_splice+0x9ef/0x1b30 fs/splice.c:1079 __do_splice+0xf4/0x1b0 fs/splice.c:1144 __do_sys_splice fs/splice.c:1350 [inline] __se_sys_splice fs/splice.c:1332 [inline] __x64_sys_splice+0x14a/0x200 fs/splice.c:1332 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f2f48d96a39 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:00007f2f4850c188 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007f2f48e99f60 RCX: 00007f2f48d96a39 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007f2f48df0e8f R08: 0000000000010976 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f2f493cdb2f R14: 00007f2f4850c300 R15: 0000000000022000 Allocated by task 8748: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:724 [inline] taprio_change+0x51b/0x3a80 net/sched/sch_taprio.c:1484 qdisc_change net/sched/sch_api.c:1329 [inline] tc_modify_qdisc+0xafa/0x1630 net/sched/sch_api.c:1631 rtnetlink_rcv_msg+0x31d/0x8d0 net/core/rtnetlink.c:5571 netlink_rcv_skb+0x118/0x370 net/netlink/af_netlink.c:2496 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x42e/0x700 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x775/0xc10 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:724 sock_no_sendpage+0xea/0x130 net/core/sock.c:3080 kernel_sendpage.part.0+0x121/0x250 net/socket.c:3504 kernel_sendpage net/socket.c:3501 [inline] sock_sendpage+0xc7/0x1a0 net/socket.c:1003 pipe_to_sendpage+0x245/0x410 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x362/0x810 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xba/0x120 fs/splice.c:746 do_splice_from fs/splice.c:767 [inline] do_splice+0x9ef/0x1b30 fs/splice.c:1079 __do_splice+0xf4/0x1b0 fs/splice.c:1144 __do_sys_splice fs/splice.c:1350 [inline] __se_sys_splice fs/splice.c:1332 [inline] __x64_sys_splice+0x14a/0x200 fs/splice.c:1332 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 3921: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free mm/kasan/common.c:328 [inline] __kasan_slab_free+0xff/0x130 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1749 slab_free mm/slub.c:3513 [inline] kfree+0xf6/0x560 mm/slub.c:4561 rcu_do_batch kernel/rcu/tree.c:2506 [inline] rcu_core+0x7ab/0x1470 kernel/rcu/tree.c:2741 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 Last potentially related work creation: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xf5/0x120 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:2985 [inline] call_rcu+0xb1/0x740 kernel/rcu/tree.c:3065 taprio_change+0x259a/0x3a80 net/sched/sch_taprio.c:1604 qdisc_change net/sched/sch_api.c:1329 [inline] tc_modify_qdisc+0xafa/0x1630 net/sched/sch_api.c:1631 rtnetlink_rcv_msg+0x31d/0x8d0 net/core/rtnetlink.c:5571 netlink_rcv_skb+0x118/0x370 net/netlink/af_netlink.c:2496 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x42e/0x700 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x775/0xc10 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:724 sock_no_sendpage+0xea/0x130 net/core/sock.c:3080 kernel_sendpage.part.0+0x121/0x250 net/socket.c:3504 kernel_sendpage net/socket.c:3501 [inline] sock_sendpage+0xc7/0x1a0 net/socket.c:1003 pipe_to_sendpage+0x245/0x410 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x362/0x810 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xba/0x120 fs/splice.c:746 do_splice_from fs/splice.c:767 [inline] do_splice+0x9ef/0x1b30 fs/splice.c:1079 __do_splice+0xf4/0x1b0 fs/splice.c:1144 __do_sys_splice fs/splice.c:1350 [inline] __se_sys_splice fs/splice.c:1332 [inline] __x64_sys_splice+0x14a/0x200 fs/splice.c:1332 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xf5/0x120 mm/kasan/generic.c:348 kvfree_call_rcu+0x74/0x990 kernel/rcu/tree.c:3550 cfg80211_update_known_bss+0x785/0xa90 net/wireless/scan.c:1663 cfg80211_bss_update+0xd9/0x1e50 net/wireless/scan.c:1710 cfg80211_inform_single_bss_frame_data+0x60d/0xcb0 net/wireless/scan.c:2425 cfg80211_inform_bss_frame_data+0x94/0xaa0 net/wireless/scan.c:2458 ieee80211_bss_info_update+0x267/0x8b0 net/mac80211/scan.c:190 ieee80211_rx_bss_info net/mac80211/ibss.c:1119 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1610 [inline] ieee80211_ibss_rx_queued_mgmt+0x1280/0x3000 net/mac80211/ibss.c:1639 ieee80211_iface_process_skb net/mac80211/iface.c:1468 [inline] ieee80211_iface_work+0x729/0x970 net/mac80211/iface.c:1522 process_one_work+0x87f/0x1450 kernel/workqueue.c:2298 worker_thread+0x598/0x1040 kernel/workqueue.c:2445 kthread+0x3ab/0x480 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888017407980 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 64 bytes inside of 96-byte region [ffff888017407980, ffff8880174079e0) The buggy address belongs to the page: page:ffffea00005d01c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x17407 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00006d6b40 dead000000000006 ffff88800fc41780 raw: 0000000000000000 0000000000200020 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 4359, ts 79516094884, free_ts 79515558474 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0xa6f/0x2f10 mm/page_alloc.c:4149 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5369 __alloc_pages_node include/linux/gfp.h:570 [inline] alloc_slab_page mm/slub.c:1795 [inline] allocate_slab mm/slub.c:1930 [inline] new_slab+0xab/0x4a0 mm/slub.c:1993 ___slab_alloc+0x91a/0xfd0 mm/slub.c:3022 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3109 slab_alloc_node mm/slub.c:3200 [inline] __kmalloc_node+0x2cb/0x390 mm/slub.c:4467 kmalloc_array_node include/linux/slab.h:686 [inline] kcalloc_node include/linux/slab.h:691 [inline] memcg_alloc_page_obj_cgroups+0x8b/0x140 mm/memcontrol.c:2827 memcg_slab_post_alloc_hook+0x90/0x430 mm/slab.h:313 slab_post_alloc_hook mm/slab.h:526 [inline] slab_alloc_node mm/slub.c:3234 [inline] slab_alloc mm/slub.c:3242 [inline] kmem_cache_alloc+0x15c/0x3a0 mm/slub.c:3247 alloc_inode+0x11e/0x1e0 fs/inode.c:237 new_inode_pseudo+0x9/0xd0 fs/inode.c:944 get_pipe_inode fs/pipe.c:869 [inline] create_pipe_files+0x48/0x860 fs/pipe.c:909 __do_pipe_flags fs/pipe.c:958 [inline] do_pipe2+0x78/0x150 fs/pipe.c:1006 __do_sys_pipe fs/pipe.c:1029 [inline] __se_sys_pipe fs/pipe.c:1027 [inline] __x64_sys_pipe+0x2a/0x40 fs/pipe.c:1027 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3309 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3388 __vunmap+0x5a1/0x960 mm/vmalloc.c:2632 netlink_skb_destructor+0x99/0x1d0 net/netlink/af_netlink.c:375 skb_release_head_state+0x71/0x1d0 net/core/skbuff.c:729 skb_release_all net/core/skbuff.c:740 [inline] __kfree_skb net/core/skbuff.c:756 [inline] consume_skb net/core/skbuff.c:912 [inline] consume_skb+0x64/0xf0 net/core/skbuff.c:906 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x436/0x700 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x775/0xc10 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:724 sock_no_sendpage+0xea/0x130 net/core/sock.c:3080 kernel_sendpage.part.0+0x121/0x250 net/socket.c:3504 kernel_sendpage net/socket.c:3501 [inline] sock_sendpage+0xc7/0x1a0 net/socket.c:1003 pipe_to_sendpage+0x245/0x410 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x362/0x810 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xba/0x120 fs/splice.c:746 do_splice_from fs/splice.c:767 [inline] do_splice+0x9ef/0x1b30 fs/splice.c:1079 Memory state around the buggy address: ffff888017407880: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff888017407900: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc >ffff888017407980: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff888017407a00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff888017407a80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================