================================================================== BUG: KASAN: slab-use-after-free in netdev_need_ops_lock include/net/netdev_lock.h:30 [inline] BUG: KASAN: slab-use-after-free in netdev_unlock_ops include/net/netdev_lock.h:47 [inline] BUG: KASAN: slab-use-after-free in __linkwatch_run_queue+0x658/0x8d4 net/core/link_watch.c:245 Read of size 1 at addr ebf0000018a62ca1 by task kworker/u4:10/5064 Pointer tag: [eb], memory tag: [fe] CPU: 0 UID: 0 PID: 5064 Comm: kworker/u4:10 Not tainted syzkaller #0 PREEMPT Hardware name: linux,dummy-virt (DT) Workqueue: events_unbound linkwatch_event Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xac/0x288 mm/kasan/report.c:378 print_report+0x84/0xa0 mm/kasan/report.c:482 kasan_report+0xb0/0x110 mm/kasan/report.c:595 kasan_tag_mismatch+0x28/0x3c mm/kasan/sw_tags.c:175 __hwasan_tag_mismatch+0x30/0x60 arch/arm64/lib/kasan_sw_tags.S:55 netdev_need_ops_lock include/net/netdev_lock.h:30 [inline] netdev_unlock_ops include/net/netdev_lock.h:47 [inline] __linkwatch_run_queue+0x658/0x8d4 net/core/link_watch.c:245 linkwatch_event+0x30/0x40 net/core/link_watch.c:304 process_one_work+0x954/0x1a18 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0xb58/0x11b8 kernel/workqueue.c:3400 kthread+0x794/0x9a0 kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 Freed by task 7560: kasan_save_stack+0x40/0x6c mm/kasan/common.c:47 save_stack_info+0x30/0x138 mm/kasan/tags.c:106 kasan_save_free_info+0x18/0x24 mm/kasan/tags.c:147 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x64/0x68 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kfree+0x148/0x44c mm/slub.c:4879 kvfree+0x30/0x40 mm/slub.c:5095 netdev_release+0x9c/0xd0 net/core/net-sysfs.c:2250 device_release+0xb8/0x2a4 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x358/0x518 lib/kobject.c:737 netdev_run_todo+0xe54/0xfd8 net/core/dev.c:11513 rtnl_unlock+0x14/0x20 net/core/rtnetlink.c:157 default_device_exit_batch+0xaf4/0xb74 net/core/dev.c:12734 ops_exit_list net/core/net_namespace.c:204 [inline] ops_undo_list+0x544/0xa08 net/core/net_namespace.c:251 cleanup_net+0x48c/0x868 net/core/net_namespace.c:682 process_one_work+0x954/0x1a18 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0xb58/0x11b8 kernel/workqueue.c:3400 kthread+0x794/0x9a0 kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 The buggy address belongs to the object at fff0000018a62000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 3233 bytes inside of 4096-byte region [fff0000018a62000, fff0000018a63000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xebf0000018a62000 pfn:0x58a60 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:edf000001dc0b681 flags: 0x1ffc00000000240(workingset|head|node=0|zone=0|lastcpupid=0x7ff|kasantag=0x0) page_type: f5(slab) raw: 01ffc00000000240 28f000000cc09000 ffffc1ffc06f4a10 ffffc1ffc093e210 raw: ebf0000018a62000 0000000000080003 00000000f5000000 edf000001dc0b681 head: 01ffc00000000240 28f000000cc09000 ffffc1ffc06f4a10 ffffc1ffc093e210 head: ebf0000018a62000 0000000000080003 00000000f5000000 edf000001dc0b681 head: 01ffc00000000003 ffffc1ffc0629801 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: fff0000018a62a00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fff0000018a62b00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe >fff0000018a62c00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ^ fff0000018a62d00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fff0000018a62e00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ==================================================================