device veth1_macvtap left promiscuous mode device veth0_macvtap left promiscuous mode device veth1_vlan left promiscuous mode device veth0_vlan left promiscuous mode ================================================================== BUG: KASAN: use-after-free in qfq_reset_qdisc+0x280/0x300 net/sched/sch_qfq.c:1468 Read of size 8 at addr ffff88804fe9e7c8 by task kworker/u4:5/26285 CPU: 0 PID: 26285 Comm: kworker/u4:5 Not tainted 4.19.99-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 qfq_reset_qdisc+0x280/0x300 net/sched/sch_qfq.c:1468 qdisc_destroy+0x152/0x6b0 net/sched/sch_generic.c:980 dev_shutdown+0x2c5/0x497 net/sched/sch_generic.c:1300 rollback_registered_many+0x6f9/0xda0 net/core/dev.c:8164 unregister_netdevice_many.part.0+0x1b/0x1f0 net/core/dev.c:9283 unregister_netdevice_many net/core/dev.c:9282 [inline] default_device_exit_batch+0x34e/0x410 net/core/dev.c:9754 ops_exit_list.isra.0+0xfc/0x150 net/core/net_namespace.c:156 cleanup_net+0x404/0x960 net/core/net_namespace.c:553 process_one_work+0x989/0x1750 kernel/workqueue.c:2153 worker_thread+0x98/0xe40 kernel/workqueue.c:2296 kthread+0x354/0x420 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 22223: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531 kmem_cache_alloc_trace+0x152/0x760 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] qfq_change_class+0xd29/0x15ce net/sched/sch_qfq.c:511 tc_ctl_tclass+0x4f8/0xc60 net/sched/sch_api.c:1990 rtnetlink_rcv_msg+0x463/0xb00 net/core/rtnetlink.c:4768 netlink_rcv_skb+0x17d/0x460 net/netlink/af_netlink.c:2454 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4786 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x53a/0x730 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x8ae/0xd70 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:632 ___sys_sendmsg+0x803/0x920 net/socket.c:2115 __sys_sendmsg+0x105/0x1d0 net/socket.c:2153 __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2160 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 26285: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x220 mm/slab.c:3822 qfq_destroy_agg net/sched/sch_qfq.c:349 [inline] qfq_rm_from_agg.isra.0+0x23c/0x2f0 net/sched/sch_qfq.c:370 qfq_destroy_class+0x23/0x70 net/sched/sch_qfq.c:538 qfq_destroy_qdisc+0x122/0x1b0 net/sched/sch_qfq.c:1490 qdisc_destroy+0x18a/0x6b0 net/sched/sch_generic.c:982 dev_shutdown+0x2c5/0x497 net/sched/sch_generic.c:1300 rollback_registered_many+0x6f9/0xda0 net/core/dev.c:8164 unregister_netdevice_many.part.0+0x1b/0x1f0 net/core/dev.c:9283 unregister_netdevice_many net/core/dev.c:9282 [inline] default_device_exit_batch+0x34e/0x410 net/core/dev.c:9754 ops_exit_list.isra.0+0xfc/0x150 net/core/net_namespace.c:156 cleanup_net+0x404/0x960 net/core/net_namespace.c:553 process_one_work+0x989/0x1750 kernel/workqueue.c:2153 worker_thread+0x98/0xe40 kernel/workqueue.c:2296 kthread+0x354/0x420 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff88804fe9e780 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 72 bytes inside of 128-byte region [ffff88804fe9e780, ffff88804fe9e800) The buggy address belongs to the page: page:ffffea00013fa780 count:1 mapcount:0 mapping:ffff88812c31c640 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea00028e8dc8 ffffea0000b14008 ffff88812c31c640 raw: 0000000000000000 ffff88804fe9e000 0000000100000015 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804fe9e680: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff88804fe9e700: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88804fe9e780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804fe9e800: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff88804fe9e880: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ==================================================================