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+0x24c/0x2c0 net/sched/sch_qfq.c:1463 Read of size 8 at addr ffff888037e0f1c8 by task kworker/u4:5/7355 CPU: 1 PID: 7355 Comm: kworker/u4:5 Not tainted 4.14.171-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:17 [inline] dump_stack+0x142/0x197 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2af mm/kasan/report.c:393 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 qfq_reset_qdisc+0x24c/0x2c0 net/sched/sch_qfq.c:1463 qdisc_destroy+0x10e/0x320 net/sched/sch_generic.c:723 dev_shutdown+0x28e/0x44b net/sched/sch_generic.c:1000 rollback_registered_many+0x6fd/0xb60 net/core/dev.c:7199 unregister_netdevice_many.part.0+0x1b/0x1e0 net/core/dev.c:8278 unregister_netdevice_many net/core/dev.c:8277 [inline] default_device_exit_batch+0x31e/0x3d0 net/core/dev.c:8739 ops_exit_list.isra.0+0xfc/0x150 net/core/net_namespace.c:145 cleanup_net+0x3ba/0x870 net/core/net_namespace.c:484 process_one_work+0x863/0x1600 kernel/workqueue.c:2114 worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248 kthread+0x319/0x430 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 24355: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc_track_caller+0x159/0x790 mm/slab.c:3735 kmemdup+0x27/0x60 mm/util.c:118 kmemdup include/linux/string.h:420 [inline] mpls_dev_sysctl_register+0x9a/0x2c0 net/mpls/af_mpls.c:1323 mpls_add_dev net/mpls/af_mpls.c:1389 [inline] mpls_dev_notify+0x203/0x691 net/mpls/af_mpls.c:1511 notifier_call_chain+0x111/0x1b0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x56/0x70 net/core/dev.c:1671 call_netdevice_notifiers net/core/dev.c:1687 [inline] register_netdevice+0xa38/0xcd0 net/core/dev.c:7691 veth_newlink+0x403/0x900 drivers/net/veth.c:416 rtnl_newlink+0xecb/0x1700 net/core/rtnetlink.c:2728 rtnetlink_rcv_msg+0x3da/0xb70 net/core/rtnetlink.c:4315 netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4327 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x44d/0x650 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xb9/0x140 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2103 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 7355: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 mpls_dev_sysctl_unregister+0x8d/0xc0 net/mpls/af_mpls.c:1359 mpls_dev_notify+0x4ce/0x691 net/mpls/af_mpls.c:1544 notifier_call_chain+0x111/0x1b0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x56/0x70 net/core/dev.c:1671 call_netdevice_notifiers net/core/dev.c:1687 [inline] rollback_registered_many+0x70d/0xb60 net/core/dev.c:7205 unregister_netdevice_many.part.0+0x1b/0x1e0 net/core/dev.c:8278 unregister_netdevice_many net/core/dev.c:8277 [inline] default_device_exit_batch+0x31e/0x3d0 net/core/dev.c:8739 ops_exit_list.isra.0+0xfc/0x150 net/core/net_namespace.c:145 cleanup_net+0x3ba/0x870 net/core/net_namespace.c:484 process_one_work+0x863/0x1600 kernel/workqueue.c:2114 worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248 kthread+0x319/0x430 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff888037e0f180 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 72 bytes inside of 128-byte region [ffff888037e0f180, ffff888037e0f200) The buggy address belongs to the page: page:ffffea0000df83c0 count:1 mapcount:0 mapping:ffff888037e0f000 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff888037e0f000 0000000000000000 0000000100000015 raw: ffffea00009b7560 ffffea0000e312a0 ffff8880aa800640 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888037e0f080: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff888037e0f100: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff888037e0f180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888037e0f200: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff888037e0f280: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ==================================================================