================================================================== BUG: KASAN: slab-use-after-free in __ethtool_get_link_ksettings+0x20/0xb4 net/ethtool/ioctl.c:440 Read at addr f3f00000071f82f8 by task kworker/0:2/8075 Pointer tag: [f3], memory tag: [fe] CPU: 0 UID: 0 PID: 8075 Comm: kworker/0:2 Not tainted 6.12.0-rc7-syzkaller-00187-gf868cd251776 #0 Hardware name: linux,dummy-virt (DT) Workqueue: events smc_ib_port_event_work Call trace: dump_backtrace+0x94/0xec arch/arm64/kernel/stacktrace.c:319 show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:326 __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x78/0x90 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x108/0x618 mm/kasan/report.c:488 kasan_report+0x88/0xac mm/kasan/report.c:601 report_tag_fault arch/arm64/mm/fault.c:332 [inline] do_tag_recovery arch/arm64/mm/fault.c:344 [inline] __do_kernel_fault+0x170/0x1c8 arch/arm64/mm/fault.c:386 do_bad_area arch/arm64/mm/fault.c:486 [inline] do_tag_check_fault+0x78/0x8c arch/arm64/mm/fault.c:803 do_mem_abort+0x44/0x94 arch/arm64/mm/fault.c:879 el1_abort+0x40/0x60 arch/arm64/kernel/entry-common.c:432 el1h_64_sync_handler+0xd8/0xe4 arch/arm64/kernel/entry-common.c:492 el1h_64_sync+0x64/0x68 arch/arm64/kernel/entry.S:593 __ethtool_get_link_ksettings+0x20/0xb4 net/ethtool/ioctl.c:440 ipvlan_ethtool_get_link_ksettings+0x14/0x20 drivers/net/ipvlan/ipvlan_main.c:410 __ethtool_get_link_ksettings+0x5c/0xb4 net/ethtool/ioctl.c:449 ib_get_eth_speed+0x84/0x354 drivers/infiniband/core/verbs.c:1996 rxe_query_port+0x78/0x114 drivers/infiniband/sw/rxe/rxe_verbs.c:55 __ib_query_port drivers/infiniband/core/device.c:2111 [inline] ib_query_port drivers/infiniband/core/device.c:2143 [inline] ib_query_port+0x154/0x204 drivers/infiniband/core/device.c:2133 smc_ib_remember_port_attr net/smc/smc_ib.c:364 [inline] smc_ib_port_event_work+0x98/0x3c4 net/smc/smc_ib.c:388 process_one_work+0x15c/0x29c kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x24c/0x354 kernel/workqueue.c:3391 kthread+0x114/0x118 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Freed by task 11: kasan_save_stack+0x3c/0x64 mm/kasan/common.c:47 save_stack_info+0x40/0x158 mm/kasan/tags.c:106 kasan_save_free_info+0x18/0x24 mm/kasan/tags.c:147 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x74/0x8c mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:2342 [inline] slab_free mm/slub.c:4579 [inline] kfree+0xfc/0x2f0 mm/slub.c:4727 kvfree+0x3c/0x4c mm/util.c:701 netdev_release+0x30/0x44 net/core/net-sysfs.c:2034 device_release+0x34/0x90 drivers/base/core.c:2574 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0xa4/0x114 lib/kobject.c:737 netdev_run_todo+0x1d0/0x578 net/core/dev.c:10820 rtnl_unlock+0x10/0x1c net/core/rtnetlink.c:152 default_device_exit_batch+0x2a0/0x314 net/core/dev.c:11953 ops_exit_list+0x64/0x78 net/core/net_namespace.c:178 cleanup_net+0x294/0x498 net/core/net_namespace.c:626 process_one_work+0x15c/0x29c kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x24c/0x354 kernel/workqueue.c:3391 kthread+0x114/0x118 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 The buggy address belongs to the object at fff00000071f8000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 760 bytes inside of 4096-byte region [fff00000071f8000, fff00000071f9000) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xf8f00000071fa000 pfn:0x471f8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x1ffc00000000240(workingset|head|node=0|zone=0|lastcpupid=0x7ff|kasantag=0x0) page_type: f5(slab) raw: 01ffc00000000240 f2f000000300c000 ffffc1ffc0196010 ffffc1ffc0251610 raw: f8f00000071fa000 0000000000080003 00000001f5000000 0000000000000000 head: 01ffc00000000240 f2f000000300c000 ffffc1ffc0196010 ffffc1ffc0251610 head: f8f00000071fa000 0000000000080003 00000001f5000000 0000000000000000 head: 01ffc00000000003 ffffc1ffc01c7e01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: fff00000071f8000: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fff00000071f8100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe >fff00000071f8200: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ^ fff00000071f8300: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fff00000071f8400: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ==================================================================