================================================================== BUG: KASAN: slab-use-after-free in __ethtool_get_link_ksettings+0x20/0xb4 net/ethtool/ioctl.c:441 Read at addr f0f00000077622e8 by task kworker/1:4/3476 Pointer tag: [f0], memory tag: [fe] CPU: 1 UID: 0 PID: 3476 Comm: kworker/1:4 Not tainted 6.16.0-rc3-syzkaller-00042-g78f4e737a53e #0 PREEMPT Hardware name: linux,dummy-virt (DT) Workqueue: infiniband ib_cache_event_task Call trace: show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:466 (C) __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:408 [inline] print_report+0x108/0x630 mm/kasan/report.c:521 kasan_report+0x88/0xac mm/kasan/report.c:634 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:843 do_mem_abort+0x44/0x94 arch/arm64/mm/fault.c:919 el1_abort+0x40/0x60 arch/arm64/kernel/entry-common.c:455 el1h_64_sync_handler+0xa4/0x120 arch/arm64/kernel/entry-common.c:533 el1h_64_sync+0x6c/0x70 arch/arm64/kernel/entry.S:595 __ethtool_get_link_ksettings+0x20/0xb4 net/ethtool/ioctl.c:441 (P) ipvlan_ethtool_get_link_ksettings+0x14/0x20 drivers/net/ipvlan/ipvlan_main.c:411 __ethtool_get_link_ksettings+0x5c/0xb4 net/ethtool/ioctl.c:450 ib_get_eth_speed+0x84/0x354 drivers/infiniband/core/verbs.c:1996 rxe_query_port+0xf8/0x1b4 drivers/infiniband/sw/rxe/rxe_verbs.c:62 __ib_query_port drivers/infiniband/core/device.c:2111 [inline] ib_query_port drivers/infiniband/core/device.c:2143 [inline] ib_query_port+0x150/0x200 drivers/infiniband/core/device.c:2133 ib_cache_update.part.0+0x70/0x3e8 drivers/infiniband/core/cache.c:1459 ib_cache_update drivers/infiniband/core/cache.c:1539 [inline] ib_cache_event_task+0x60/0x90 drivers/infiniband/core/cache.c:1539 process_one_work+0x178/0x2cc kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x250/0x358 kernel/workqueue.c:3402 kthread+0x130/0x1fc kernel/kthread.c:464 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 Freed by task 5418: 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:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kfree+0xfc/0x30c mm/slub.c:4842 kvfree+0x3c/0x4c mm/slub.c:5058 netdev_release+0x30/0x44 net/core/net-sysfs.c:2231 device_release+0x34/0x90 drivers/base/core.c:2568 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+0x1f0/0x5a0 net/core/dev.c:11412 rtnl_unlock net/core/rtnetlink.c:157 [inline] rtnl_net_unlock include/linux/rtnetlink.h:135 [inline] rtnl_dellink+0x154/0x394 net/core/rtnetlink.c:3561 rtnetlink_rcv_msg+0x304/0x398 net/core/rtnetlink.c:6944 netlink_rcv_skb+0x5c/0x128 net/netlink/af_netlink.c:2534 rtnetlink_rcv+0x18/0x24 net/core/rtnetlink.c:6971 netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] netlink_unicast+0x1c8/0x2dc net/netlink/af_netlink.c:1339 netlink_sendmsg+0x194/0x400 net/netlink/af_netlink.c:1883 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0x54/0x60 net/socket.c:727 ____sys_sendmsg+0x234/0x29c net/socket.c:2566 ___sys_sendmsg+0xac/0x100 net/socket.c:2620 __sys_sendmsg+0x98/0xf8 net/socket.c:2652 __do_sys_sendmsg net/socket.c:2657 [inline] __se_sys_sendmsg net/socket.c:2655 [inline] __arm64_sys_sendmsg+0x24/0x30 net/socket.c:2655 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x48/0x110 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0x40/0xe0 arch/arm64/kernel/syscall.c:132 do_el0_svc+0x1c/0x28 arch/arm64/kernel/syscall.c:151 el0_svc+0xa8/0x124 arch/arm64/kernel/entry-common.c:767 el0t_64_sync_handler+0x10c/0x138 arch/arm64/kernel/entry-common.c:786 el0t_64_sync+0x1a4/0x1a8 arch/arm64/kernel/entry.S:600 The buggy address belongs to the object at fff0000007762000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 744 bytes inside of 4096-byte region [fff0000007762000, fff0000007763000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xf5f0000007763000 pfn:0x47760 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 f7f0000003008000 ffffc1ffc0272410 ffffc1ffc022f810 raw: f5f0000007763000 0000000000080002 00000000f5000000 0000000000000000 head: 01ffc00000000240 f7f0000003008000 ffffc1ffc0272410 ffffc1ffc022f810 head: f5f0000007763000 0000000000080002 00000000f5000000 0000000000000000 head: 01ffc00000000003 ffffc1ffc01dd801 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: fff0000007762000: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fff0000007762100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe >fff0000007762200: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ^ fff0000007762300: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fff0000007762400: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ================================================================== syz0: Port: 1 Link DOWN