================================================================== BUG: KASAN: use-after-free in dump_schedule+0x79c/0x830 net/sched/sch_taprio.c:1841 Read of size 8 at addr ffff88801e52ab40 by task syz-executor062/15158 CPU: 0 PID: 15158 Comm: syz-executor062 Not tainted 5.15.0-rc7-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+0xcd/0x134 lib/dump_stack.c:106 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+0x79c/0x830 net/sched/sch_taprio.c:1841 taprio_dump+0x53d/0xdf0 net/sched/sch_taprio.c:1910 tc_fill_qdisc+0x60e/0x12e0 net/sched/sch_api.c:923 qdisc_notify.isra.0+0x2b1/0x310 net/sched/sch_api.c:990 tc_modify_qdisc+0xf85/0x1a60 net/sched/sch_api.c:1642 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5572 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2510 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x86d/0xdb0 net/netlink/af_netlink.c:1935 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 sock_no_sendpage+0xf3/0x130 net/core/sock.c:2998 kernel_sendpage.part.0+0x1a0/0x340 net/socket.c:3504 kernel_sendpage net/socket.c:3501 [inline] sock_sendpage+0xe5/0x140 net/socket.c:1003 pipe_to_sendpage+0x2ad/0x380 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x43e/0x8a0 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xd4/0x140 fs/splice.c:746 do_splice_from fs/splice.c:767 [inline] do_splice+0xb7e/0x1960 fs/splice.c:1079 __do_splice+0x134/0x250 fs/splice.c:1144 __do_sys_splice fs/splice.c:1350 [inline] __se_sys_splice fs/splice.c:1332 [inline] __x64_sys_splice+0x198/0x250 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:0x7f1122a5acb9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 31 19 00 00 90 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:00007f1122bfec88 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f1122a5acb9 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000010976 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f1122bfecc8 R13: 00007f1122bfece0 R14: 00007f1122bfed20 R15: 000000000000203f Allocated by task 15153: 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+0x5fb/0x4160 net/sched/sch_taprio.c:1477 qdisc_change net/sched/sch_api.c:1338 [inline] tc_modify_qdisc+0xd9a/0x1a60 net/sched/sch_api.c:1640 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5572 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2510 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x86d/0xdb0 net/netlink/af_netlink.c:1935 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 sock_no_sendpage+0xf3/0x130 net/core/sock.c:2998 kernel_sendpage.part.0+0x1a0/0x340 net/socket.c:3504 kernel_sendpage net/socket.c:3501 [inline] sock_sendpage+0xe5/0x140 net/socket.c:1003 pipe_to_sendpage+0x2ad/0x380 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x43e/0x8a0 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xd4/0x140 fs/splice.c:746 do_splice_from fs/splice.c:767 [inline] do_splice+0xb7e/0x1960 fs/splice.c:1079 __do_splice+0x134/0x250 fs/splice.c:1144 __do_sys_splice fs/splice.c:1350 [inline] __se_sys_splice fs/splice.c:1332 [inline] __x64_sys_splice+0x198/0x250 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 15158: 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:1700 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1726 slab_free mm/slub.c:3492 [inline] kfree+0xf3/0x550 mm/slub.c:4552 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+0x2fe5/0x4160 net/sched/sch_taprio.c:1597 qdisc_change net/sched/sch_api.c:1338 [inline] tc_modify_qdisc+0xd9a/0x1a60 net/sched/sch_api.c:1640 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5572 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2510 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x86d/0xdb0 net/netlink/af_netlink.c:1935 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 sock_no_sendpage+0xf3/0x130 net/core/sock.c:2998 kernel_sendpage.part.0+0x1a0/0x340 net/socket.c:3504 kernel_sendpage net/socket.c:3501 [inline] sock_sendpage+0xe5/0x140 net/socket.c:1003 pipe_to_sendpage+0x2ad/0x380 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x43e/0x8a0 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xd4/0x140 fs/splice.c:746 do_splice_from fs/splice.c:767 [inline] do_splice+0xb7e/0x1960 fs/splice.c:1079 __do_splice+0x134/0x250 fs/splice.c:1144 __do_sys_splice fs/splice.c:1350 [inline] __se_sys_splice fs/splice.c:1332 [inline] __x64_sys_splice+0x198/0x250 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+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+0x2fe5/0x4160 net/sched/sch_taprio.c:1597 qdisc_change net/sched/sch_api.c:1338 [inline] tc_modify_qdisc+0xd9a/0x1a60 net/sched/sch_api.c:1640 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5572 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2510 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x86d/0xdb0 net/netlink/af_netlink.c:1935 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 sock_no_sendpage+0xf3/0x130 net/core/sock.c:2998 kernel_sendpage.part.0+0x1a0/0x340 net/socket.c:3504 kernel_sendpage net/socket.c:3501 [inline] sock_sendpage+0xe5/0x140 net/socket.c:1003 pipe_to_sendpage+0x2ad/0x380 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x43e/0x8a0 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xd4/0x140 fs/splice.c:746 do_splice_from fs/splice.c:767 [inline] do_splice+0xb7e/0x1960 fs/splice.c:1079 __do_splice+0x134/0x250 fs/splice.c:1144 __do_sys_splice fs/splice.c:1350 [inline] __se_sys_splice fs/splice.c:1332 [inline] __x64_sys_splice+0x198/0x250 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 The buggy address belongs to the object at ffff88801e52ab00 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 64 bytes inside of 96-byte region [ffff88801e52ab00, ffff88801e52ab60) The buggy address belongs to the page: page:ffffea0000794a80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1e52a flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000073f200 0000001300000013 ffff888010c41780 raw: 0000000000000000 0000000080200020 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 148, ts 8257061187, free_ts 0 prep_new_page mm/page_alloc.c:2424 [inline] get_page_from_freelist+0xa72/0x2f80 mm/page_alloc.c:4153 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5375 alloc_pages+0x1a7/0x300 mm/mempolicy.c:2191 alloc_slab_page mm/slub.c:1770 [inline] allocate_slab mm/slub.c:1907 [inline] new_slab+0x319/0x490 mm/slub.c:1970 ___slab_alloc+0x950/0x1050 mm/slub.c:3001 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3088 slab_alloc_node mm/slub.c:3179 [inline] slab_alloc mm/slub.c:3221 [inline] kmem_cache_alloc_trace+0x302/0x3c0 mm/slub.c:3238 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] blk_mq_alloc_ctxs block/blk-mq.c:3062 [inline] blk_mq_init_allocated_queue+0xfd/0x12c0 block/blk-mq.c:3279 blk_mq_init_queue_data block/blk-mq.c:3123 [inline] blk_mq_init_queue+0x75/0xd0 block/blk-mq.c:3133 scsi_alloc_sdev+0x814/0xd70 drivers/scsi/scsi_scan.c:272 scsi_probe_and_add_lun+0x200b/0x3590 drivers/scsi/scsi_scan.c:1106 __scsi_scan_target+0x21f/0xdb0 drivers/scsi/scsi_scan.c:1588 scsi_scan_channel drivers/scsi/scsi_scan.c:1676 [inline] scsi_scan_channel+0x148/0x1e0 drivers/scsi/scsi_scan.c:1652 scsi_scan_host_selected+0x2df/0x3b0 drivers/scsi/scsi_scan.c:1705 do_scsi_scan_host+0x1e8/0x260 drivers/scsi/scsi_scan.c:1844 do_scan_async+0x3e/0x500 drivers/scsi/scsi_scan.c:1854 page_owner free stack trace missing Memory state around the buggy address: ffff88801e52aa00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff88801e52aa80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff88801e52ab00: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff88801e52ab80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff88801e52ac00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ==================================================================