================================================================== BUG: KASAN: use-after-free in dump_schedule+0x6d2/0x750 net/sched/sch_taprio.c:1837 Read of size 8 at addr ffff88805fc7cbc0 by task syz-executor.5/32069 CPU: 1 PID: 32069 Comm: syz-executor.5 Not tainted 5.14.0-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:105 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 dump_schedule+0x6d2/0x750 net/sched/sch_taprio.c:1837 taprio_dump+0x431/0xbd0 net/sched/sch_taprio.c:1906 tc_fill_qdisc+0x575/0x1090 net/sched/sch_api.c:917 qdisc_notify.isra.0+0x229/0x2a0 net/sched/sch_api.c:984 tc_modify_qdisc+0xc89/0x16c0 net/sched/sch_api.c:1636 rtnetlink_rcv_msg+0x31d/0x8d0 net/core/rtnetlink.c:5572 netlink_rcv_skb+0x118/0x370 net/netlink/af_netlink.c:2504 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x42e/0x700 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x704/0xbf0 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:724 ____sys_sendmsg+0x5bf/0x7a0 net/socket.c:2409 ___sys_sendmsg+0xd3/0x150 net/socket.c:2463 __sys_sendmsg+0xb2/0x140 net/socket.c:2492 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:0x4665d9 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:00007f13bea42188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665d9 RDX: 0000000000000000 RSI: 00000000200007c0 RDI: 0000000000000004 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffe38342daf R14: 00007f13bea42300 R15: 0000000000022000 Allocated by task 32029: kasan_save_stack+0x1b/0x40 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+0xa4/0xd0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] taprio_change+0x51b/0x3b70 net/sched/sch_taprio.c:1477 qdisc_change net/sched/sch_api.c:1332 [inline] tc_modify_qdisc+0xada/0x16c0 net/sched/sch_api.c:1634 rtnetlink_rcv_msg+0x31d/0x8d0 net/core/rtnetlink.c:5572 netlink_rcv_skb+0x118/0x370 net/netlink/af_netlink.c:2504 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x42e/0x700 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x704/0xbf0 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:724 ____sys_sendmsg+0x5bf/0x7a0 net/socket.c:2409 ___sys_sendmsg+0xd3/0x150 net/socket.c:2463 __sys_sendmsg+0xb2/0x140 net/socket.c:2492 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 19: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:360 ____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:230 [inline] slab_free_hook mm/slub.c:1628 [inline] slab_free_freelist_hook+0xe3/0x250 mm/slub.c:1653 slab_free mm/slub.c:3213 [inline] kfree+0xe4/0x540 mm/slub.c:4267 rcu_do_batch kernel/rcu/tree.c:2508 [inline] rcu_core+0x7ab/0x1470 kernel/rcu/tree.c:2743 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe9/0x110 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:2987 [inline] call_rcu+0xb1/0x750 kernel/rcu/tree.c:3067 taprio_change+0x2654/0x3b70 net/sched/sch_taprio.c:1597 qdisc_change net/sched/sch_api.c:1332 [inline] tc_modify_qdisc+0xada/0x16c0 net/sched/sch_api.c:1634 rtnetlink_rcv_msg+0x31d/0x8d0 net/core/rtnetlink.c:5572 netlink_rcv_skb+0x118/0x370 net/netlink/af_netlink.c:2504 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x42e/0x700 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x704/0xbf0 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:724 ____sys_sendmsg+0x5bf/0x7a0 net/socket.c:2409 ___sys_sendmsg+0xd3/0x150 net/socket.c:2463 __sys_sendmsg+0xb2/0x140 net/socket.c:2492 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+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe9/0x110 mm/kasan/generic.c:348 __call_rcu kernel/rcu/tree.c:2987 [inline] call_rcu+0xb1/0x750 kernel/rcu/tree.c:3067 taprio_change+0x2654/0x3b70 net/sched/sch_taprio.c:1597 qdisc_change net/sched/sch_api.c:1332 [inline] tc_modify_qdisc+0xada/0x16c0 net/sched/sch_api.c:1634 rtnetlink_rcv_msg+0x31d/0x8d0 net/core/rtnetlink.c:5572 netlink_rcv_skb+0x118/0x370 net/netlink/af_netlink.c:2504 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x42e/0x700 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x704/0xbf0 net/netlink/af_netlink.c:1929 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:724 ____sys_sendmsg+0x5bf/0x7a0 net/socket.c:2409 ___sys_sendmsg+0xd3/0x150 net/socket.c:2463 __sys_sendmsg+0xb2/0x140 net/socket.c:2492 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 The buggy address belongs to the object at ffff88805fc7cb80 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 64 bytes inside of 96-byte region [ffff88805fc7cb80, ffff88805fc7cbe0) The buggy address belongs to the page: page:ffffea00017f1f00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88805fc7c480 pfn:0x5fc7c flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0001d29900 0000000200000002 ffff88800fc41780 raw: ffff88805fc7c480 000000008020001f 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 0x12c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY), pid 8935, ts 72157851308, free_ts 9705968254 prep_new_page mm/page_alloc.c:2436 [inline] get_page_from_freelist+0xa6f/0x2f50 mm/page_alloc.c:4168 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5390 alloc_slab_page mm/slub.c:1691 [inline] allocate_slab+0x32e/0x4b0 mm/slub.c:1831 new_slab mm/slub.c:1894 [inline] new_slab_objects mm/slub.c:2640 [inline] ___slab_alloc+0x473/0x7b0 mm/slub.c:2803 __slab_alloc.constprop.0+0xa7/0xf0 mm/slub.c:2843 slab_alloc_node mm/slub.c:2925 [inline] slab_alloc mm/slub.c:2967 [inline] __kmalloc+0x312/0x330 mm/slub.c:4111 kmalloc include/linux/slab.h:596 [inline] kzalloc include/linux/slab.h:721 [inline] tomoyo_commit_ok+0x18/0x60 security/tomoyo/memory.c:76 tomoyo_update_domain+0x50c/0x7b0 security/tomoyo/domain.c:139 tomoyo_update_path_number_acl security/tomoyo/file.c:691 [inline] tomoyo_write_file+0x513/0x690 security/tomoyo/file.c:1034 tomoyo_write_domain2+0xe8/0x180 security/tomoyo/common.c:1152 tomoyo_add_entry security/tomoyo/common.c:2042 [inline] tomoyo_supervisor+0x98b/0xc40 security/tomoyo/common.c:2103 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x38a/0x4d0 security/tomoyo/file.c:734 tomoyo_path_mkdir+0x81/0xd0 security/tomoyo/tomoyo.c:166 security_path_mkdir+0xc0/0x130 security/security.c:1140 do_mkdirat+0x106/0x280 fs/namei.c:3907 __do_sys_mkdir fs/namei.c:3931 [inline] __se_sys_mkdir fs/namei.c:3929 [inline] __x64_sys_mkdir+0xd0/0x120 fs/namei.c:3929 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1346 [inline] free_pcp_prepare+0x2c5/0x780 mm/page_alloc.c:1397 free_unref_page_prepare mm/page_alloc.c:3332 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3411 free_contig_range+0xa8/0xf0 mm/page_alloc.c:9269 destroy_args+0x7e/0x503 mm/debug_vm_pgtable.c:1016 debug_vm_pgtable+0x1eb8/0x1f3c mm/debug_vm_pgtable.c:1329 do_one_initcall+0xbe/0x440 init/main.c:1287 do_initcall_level init/main.c:1360 [inline] do_initcalls init/main.c:1376 [inline] do_basic_setup init/main.c:1396 [inline] kernel_init_freeable+0x5b2/0x60c init/main.c:1598 kernel_init+0x14/0x120 init/main.c:1490 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88805fc7ca80: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ffff88805fc7cb00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc >ffff88805fc7cb80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff88805fc7cc00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff88805fc7cc80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================