================================================================== BUG: KASAN: use-after-free in dump_schedule+0x758/0x7d0 net/sched/sch_taprio.c:1770 Read of size 8 at addr ffff88802af231c0 by task syz-executor.0/28872 CPU: 0 PID: 28872 Comm: syz-executor.0 Not tainted 5.10.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x4c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 dump_schedule+0x758/0x7d0 net/sched/sch_taprio.c:1770 taprio_dump+0x591/0xd80 net/sched/sch_taprio.c:1839 tc_fill_qdisc+0x5e7/0x1240 net/sched/sch_api.c:916 qdisc_notify.isra.0+0x2b1/0x310 net/sched/sch_api.c:983 tc_modify_qdisc+0xf45/0x1990 net/sched/sch_api.c:1635 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5562 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:650 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:670 sock_no_sendpage+0xee/0x130 net/core/sock.c:2833 kernel_sendpage.part.0+0x1ab/0x350 net/socket.c:3621 kernel_sendpage net/socket.c:3618 [inline] sock_sendpage+0xe5/0x140 net/socket.c:943 pipe_to_sendpage+0x2ad/0x380 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x3dc/0x830 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xd4/0x140 fs/splice.c:743 do_splice_from fs/splice.c:764 [inline] do_splice+0xbb0/0x17c0 fs/splice.c:1059 __do_splice+0x134/0x250 fs/splice.c:1137 __do_sys_splice fs/splice.c:1343 [inline] __se_sys_splice fs/splice.c:1325 [inline] __x64_sys_splice+0x198/0x250 fs/splice.c:1325 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45deb9 Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fa64c8bfc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 0000000000035140 RCX: 000000000045deb9 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 000000000118bf78 R08: 0000000000010973 R09: 0000000000000005 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffe8132db7f R14: 00007fa64c8c09c0 R15: 000000000118bf2c Allocated by task 28850: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] taprio_change+0x5d7/0x2d40 net/sched/sch_taprio.c:1460 qdisc_change net/sched/sch_api.c:1331 [inline] tc_modify_qdisc+0xd41/0x1990 net/sched/sch_api.c:1633 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5562 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:650 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:670 sock_no_sendpage+0xee/0x130 net/core/sock.c:2833 kernel_sendpage.part.0+0x1ab/0x350 net/socket.c:3621 kernel_sendpage net/socket.c:3618 [inline] sock_sendpage+0xe5/0x140 net/socket.c:943 pipe_to_sendpage+0x2ad/0x380 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x3dc/0x830 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xd4/0x140 fs/splice.c:743 do_splice_from fs/splice.c:764 [inline] do_splice+0xbb0/0x17c0 fs/splice.c:1059 __do_splice+0x134/0x250 fs/splice.c:1137 __do_sys_splice fs/splice.c:1343 [inline] __se_sys_splice fs/splice.c:1325 [inline] __x64_sys_splice+0x198/0x250 fs/splice.c:1325 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 28856: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x102/0x140 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1544 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1577 slab_free mm/slub.c:3142 [inline] kfree+0xdb/0x360 mm/slub.c:4124 taprio_free_sched_cb+0x18b/0x240 net/sched/sch_taprio.c:124 rcu_do_batch kernel/rcu/tree.c:2476 [inline] rcu_core+0x5df/0xe80 kernel/rcu/tree.c:2711 __do_softirq+0x2a0/0x9f6 kernel/softirq.c:298 Last call_rcu(): kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_record_aux_stack+0xc0/0xf0 mm/kasan/generic.c:346 __call_rcu kernel/rcu/tree.c:2953 [inline] call_rcu+0xbb/0x700 kernel/rcu/tree.c:3027 taprio_change+0x2256/0x2d40 net/sched/sch_taprio.c:1578 qdisc_change net/sched/sch_api.c:1331 [inline] tc_modify_qdisc+0xd41/0x1990 net/sched/sch_api.c:1633 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5562 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:650 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:670 sock_no_sendpage+0xee/0x130 net/core/sock.c:2833 kernel_sendpage.part.0+0x1ab/0x350 net/socket.c:3621 kernel_sendpage net/socket.c:3618 [inline] sock_sendpage+0xe5/0x140 net/socket.c:943 pipe_to_sendpage+0x2ad/0x380 fs/splice.c:364 splice_from_pipe_feed fs/splice.c:418 [inline] __splice_from_pipe+0x3dc/0x830 fs/splice.c:562 splice_from_pipe fs/splice.c:597 [inline] generic_splice_sendpage+0xd4/0x140 fs/splice.c:743 do_splice_from fs/splice.c:764 [inline] do_splice+0xbb0/0x17c0 fs/splice.c:1059 __do_splice+0x134/0x250 fs/splice.c:1137 __do_sys_splice fs/splice.c:1343 [inline] __se_sys_splice fs/splice.c:1325 [inline] __x64_sys_splice+0x198/0x250 fs/splice.c:1325 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Second to last call_rcu(): kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_record_aux_stack+0xc0/0xf0 mm/kasan/generic.c:346 __call_rcu kernel/rcu/tree.c:2953 [inline] call_rcu+0xbb/0x700 kernel/rcu/tree.c:3027 nf_hook_entries_free net/netfilter/core.c:88 [inline] nf_hook_entries_free net/netfilter/core.c:75 [inline] __nf_unregister_net_hook+0x36f/0x610 net/netfilter/core.c:489 nf_unregister_net_hook net/netfilter/core.c:502 [inline] nf_unregister_net_hooks+0x117/0x160 net/netfilter/core.c:576 nf_ct_netns_do_put+0x253/0x520 net/netfilter/nf_conntrack_proto.c:540 nf_ct_netns_put net/netfilter/nf_conntrack_proto.c:617 [inline] nf_ct_netns_put+0x49/0x80 net/netfilter/nf_conntrack_proto.c:610 nf_conncount_destroy+0x45/0x190 net/netfilter/nf_conncount.c:581 ovs_ct_limit_exit net/openvswitch/conntrack.c:1899 [inline] ovs_ct_exit+0x1f5/0x480 net/openvswitch/conntrack.c:2302 ovs_exit_net+0x1e8/0xba0 net/openvswitch/datapath.c:2532 ops_exit_list+0xb0/0x160 net/core/net_namespace.c:187 cleanup_net+0x4ea/0xa00 net/core/net_namespace.c:604 process_one_work+0x933/0x15a0 kernel/workqueue.c:2272 worker_thread+0x64c/0x1120 kernel/workqueue.c:2418 kthread+0x3af/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 The buggy address belongs to the object at ffff88802af23180 which belongs to the cache kmalloc-96 of size 96 The buggy address is located 64 bytes inside of 96-byte region [ffff88802af23180, ffff88802af231e0) The buggy address belongs to the page: page:000000003aa8a0a0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2af23 flags: 0xfff00000000200(slab) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff888010041780 raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88802af23080: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff88802af23100: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc >ffff88802af23180: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff88802af23200: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff88802af23280: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================