================================================================== BUG: KASAN: slab-use-after-free in __ethtool_get_link_ksettings+0x78/0x174 net/ethtool/ioctl.c:442 Read of size 8 at addr ffff0000d4b802e8 by task kworker/0:1/10 CPU: 0 UID: 0 PID: 10 Comm: kworker/0:1 Not tainted 6.13.0-rc2-syzkaller-g2e7aff49b5da #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: events smc_ib_port_event_work Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:484 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x198/0x538 mm/kasan/report.c:489 kasan_report+0xd8/0x138 mm/kasan/report.c:602 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 __ethtool_get_link_ksettings+0x78/0x174 net/ethtool/ioctl.c:442 ipvlan_ethtool_get_link_ksettings+0x48/0x58 drivers/net/ipvlan/ipvlan_main.c:410 __ethtool_get_link_ksettings+0x130/0x174 net/ethtool/ioctl.c:449 ib_get_eth_speed+0x14c/0x708 drivers/infiniband/core/verbs.c:1996 rxe_query_port+0x80/0x258 drivers/infiniband/sw/rxe/rxe_verbs.c:55 __ib_query_port drivers/infiniband/core/device.c:2112 [inline] ib_query_port+0x150/0x75c drivers/infiniband/core/device.c:2144 smc_ib_remember_port_attr net/smc/smc_ib.c:364 [inline] smc_ib_port_event_work+0xf4/0x880 net/smc/smc_ib.c:388 process_one_work+0x7a8/0x15cc kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x97c/0xeec kernel/workqueue.c:3391 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 Allocated by task 7019: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:568 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4283 [inline] __kmalloc_node_noprof+0x338/0x55c mm/slub.c:4289 __kvmalloc_node_noprof+0x88/0x24c mm/util.c:650 alloc_netdev_mqs+0xa4/0xcf8 net/core/dev.c:11209 rtnl_create_link+0x2cc/0xae0 net/core/rtnetlink.c:3595 rtnl_newlink_create+0x1f4/0x8e4 net/core/rtnetlink.c:3771 __rtnl_newlink net/core/rtnetlink.c:3896 [inline] rtnl_newlink+0x11fc/0x1914 net/core/rtnetlink.c:4009 rtnetlink_rcv_msg+0x670/0xa9c net/core/rtnetlink.c:6919 netlink_rcv_skb+0x214/0x3c4 net/netlink/af_netlink.c:2542 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6946 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0x668/0x8a4 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x7a4/0xa8c net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg net/socket.c:726 [inline] __sys_sendto+0x360/0x4d8 net/socket.c:2197 __do_sys_sendto net/socket.c:2204 [inline] __se_sys_sendto net/socket.c:2200 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2200 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Freed by task 44: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:582 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x64/0x8c mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2338 [inline] slab_free mm/slub.c:4598 [inline] kfree+0x180/0x478 mm/slub.c:4746 kvfree+0x40/0x50 mm/util.c:693 netdev_release+0x88/0xb0 net/core/net-sysfs.c:2034 device_release+0x8c/0x1ac kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x2a8/0x41c lib/kobject.c:737 netdev_run_todo+0xcac/0xe5c net/core/dev.c:10924 rtnl_unlock+0x14/0x20 net/core/rtnetlink.c:152 default_device_exit_batch+0xa04/0xa80 net/core/dev.c:12074 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x6b8/0x9b4 net/core/net_namespace.c:632 process_one_work+0x7a8/0x15cc kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x97c/0xeec kernel/workqueue.c:3391 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 The buggy address belongs to the object at ffff0000d4b80000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 744 bytes inside of freed 4096-byte region [ffff0000d4b80000, ffff0000d4b81000) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000d4b86000 pfn:0x114b80 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff0000c6130b01 flags: 0x5ffc00000000240(workingset|head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000240 ffff0000c000f500 fffffdffc3bcbe10 fffffdffc3611810 raw: ffff0000d4b86000 0000000000040003 00000001f5000000 ffff0000c6130b01 head: 05ffc00000000240 ffff0000c000f500 fffffdffc3bcbe10 fffffdffc3611810 head: ffff0000d4b86000 0000000000040003 00000001f5000000 ffff0000c6130b01 head: 05ffc00000000003 fffffdffc352e001 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d4b80180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d4b80200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000d4b80280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d4b80300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d4b80380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================