syzbot


KASAN: use-after-free Read in __ethtool_get_link_ksettings (2)

Status: upstream: reported on 2026/02/17 03:21
Reported-by: syzbot+911579df5fb6198e1999@syzkaller.appspotmail.com
First crash: 50d, last: 12d
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Read in __ethtool_get_link_ksettings 19 7 560d 694d 0/3 auto-obsoleted due to no activity on 2025/01/02 21:40
upstream KASAN: use-after-free Read in __ethtool_get_link_ksettings net 19 2 1461d 1497d 0/29 auto-closed as invalid on 2022/07/07 00:01
upstream KASAN: use-after-free Read in __ethtool_get_link_ksettings (2) net 19 1 1354d 1350d 0/29 auto-obsoleted due to no activity on 2022/11/20 15:32
upstream KASAN: slab-use-after-free Read in __ethtool_get_link_ksettings rdma 19 syz done 30937 9m 746d 0/29 upstream: reported syz repro on 2024/03/22 20:10
linux-6.6 KASAN: slab-use-after-free Read in __ethtool_get_link_ksettings 19 1 284d 284d 0/2 auto-obsoleted due to no activity on 2025/10/05 22:34
upstream general protection fault in __ethtool_get_link_ksettings net 7 C error unreliable 298 1728d 1887d 0/29 closed as invalid on 2021/10/06 01:39

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in __ethtool_get_link_ksettings+0x6a/0x180 net/ethtool/ioctl.c:445
Read of size 8 at addr ffff888072e66208 by task kworker/0:5/4315

CPU: 0 PID: 4315 Comm: kworker/0:5 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Workqueue: events smc_ib_port_event_work
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:316 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:420
 kasan_report+0x10b/0x140 mm/kasan/report.c:524
 __ethtool_get_link_ksettings+0x6a/0x180 net/ethtool/ioctl.c:445
 ib_get_eth_speed+0x176/0x510 drivers/infiniband/core/verbs.c:1898
 rxe_query_port+0x58/0x190 drivers/infiniband/sw/rxe/rxe_verbs.c:38
 __ib_query_port drivers/infiniband/core/device.c:2082 [inline]
 ib_query_port+0x163/0x820 drivers/infiniband/core/device.c:2114
 smc_ib_remember_port_attr net/smc/smc_ib.c:364 [inline]
 smc_ib_port_event_work+0x163/0x940 net/smc/smc_ib.c:388
 process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaa2/0x1270 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Allocated by task 4276:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 ____kasan_kmalloc mm/kasan/common.c:375 [inline]
 __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:384
 kasan_kmalloc include/linux/kasan.h:211 [inline]
 __do_kmalloc_node mm/slab_common.c:936 [inline]
 __kmalloc_node+0xb0/0x240 mm/slab_common.c:943
 kmalloc_node include/linux/slab.h:589 [inline]
 kvmalloc_node+0x6c/0x180 mm/util.c:581
 kvmalloc include/linux/slab.h:716 [inline]
 kvzalloc include/linux/slab.h:724 [inline]
 alloc_netdev_mqs+0x84/0xf00 net/core/dev.c:10757
 rtnl_create_link+0x2fb/0xb80 net/core/rtnetlink.c:3295
 rtnl_newlink_create net/core/rtnetlink.c:3412 [inline]
 __rtnl_newlink net/core/rtnetlink.c:3642 [inline]
 rtnl_newlink+0x1452/0x2080 net/core/rtnetlink.c:3655
 rtnetlink_rcv_msg+0x87c/0xfc0 net/core/rtnetlink.c:6150
 netlink_rcv_skb+0x1fb/0x450 net/netlink/af_netlink.c:2511
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x74d/0x8d0 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x8ad/0xbd0 net/netlink/af_netlink.c:1872
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg net/socket.c:730 [inline]
 __sys_sendto+0x497/0x650 net/socket.c:2152
 __do_sys_sendto net/socket.c:2164 [inline]
 __se_sys_sendto net/socket.c:2160 [inline]
 __x64_sys_sendto+0xda/0xf0 net/socket.c:2160
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Freed by task 13575:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516
 ____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:237
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1729 [inline]
 slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1755
 slab_free mm/slub.c:3687 [inline]
 __kmem_cache_free+0xb6/0x1f0 mm/slub.c:3700
 device_release+0x92/0x1c0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:681 [inline]
 kobject_release lib/kobject.c:712 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x21d/0x460 lib/kobject.c:729
 netdev_run_todo+0xcb3/0xdb0 net/core/dev.c:10547
 default_device_exit_batch+0x9eb/0xa80 net/core/dev.c:11530
 ops_exit_list net/core/net_namespace.c:177 [inline]
 cleanup_net+0x791/0xba0 net/core/net_namespace.c:640
 process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaa2/0x1270 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

The buggy address belongs to the object at ffff888072e66000
 which belongs to the cache kmalloc-cg-4k of size 4096
The buggy address is located 520 bytes inside of
 4096-byte region [ffff888072e66000, ffff888072e67000)

The buggy address belongs to the physical page:
page:ffffea0001cb9800 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888072e60000 pfn:0x72e60
head:ffffea0001cb9800 order:3 compound_mapcount:0 compound_pincount:0
memcg:ffff888020ac0541
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea00015ef408 ffffea0001f2f808 ffff88801744c280
raw: ffff888072e60000 0000000000040003 00000001ffffffff ffff888020ac0541
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4272, tgid 4272 (syz-executor), ts 69908316403, free_ts 69853841532
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2559
 prep_new_page mm/page_alloc.c:2566 [inline]
 get_page_from_freelist+0x1a1e/0x1ab0 mm/page_alloc.c:4357
 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5657
 alloc_slab_page+0x5d/0x160 mm/slub.c:1799
 allocate_slab mm/slub.c:1944 [inline]
 new_slab+0x87/0x2c0 mm/slub.c:1997
 ___slab_alloc+0xbc6/0x1240 mm/slub.c:3154
 __slab_alloc mm/slub.c:3240 [inline]
 slab_alloc_node mm/slub.c:3325 [inline]
 __kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3398
 __do_kmalloc_node mm/slab_common.c:935 [inline]
 __kmalloc_node_track_caller+0x9e/0x230 mm/slab_common.c:956
 kmemdup+0x27/0x60 mm/util.c:129
 kmemdup include/linux/fortify-string.h:585 [inline]
 __addrconf_sysctl_register+0xa2/0x3e0 net/ipv6/addrconf.c:7132
 addrconf_sysctl_register+0x15c/0x1b0 net/ipv6/addrconf.c:7197
 ipv6_add_dev+0xbe0/0x1120 net/ipv6/addrconf.c:451
 addrconf_notify+0x634/0xf40 net/ipv6/addrconf.c:3595
 notifier_call_chain kernel/notifier.c:87 [inline]
 raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455
 call_netdevice_notifiers_extack net/core/dev.c:2052 [inline]
 call_netdevice_notifiers net/core/dev.c:2066 [inline]
 register_netdevice+0x163f/0x1b00 net/core/dev.c:10263
 geneve_configure+0x637/0xa70 drivers/net/geneve.c:1449
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1486 [inline]
 free_pcp_prepare mm/page_alloc.c:1536 [inline]
 free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3413
 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3508
 free_slab mm/slub.c:2036 [inline]
 discard_slab mm/slub.c:2042 [inline]
 __unfreeze_partials+0x1a5/0x200 mm/slub.c:2591
 put_cpu_partial+0x17c/0x250 mm/slub.c:2667
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:306
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737
 slab_alloc_node mm/slub.c:3359 [inline]
 __kmem_cache_alloc_node+0x140/0x260 mm/slub.c:3398
 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026
 kmalloc include/linux/slab.h:563 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 ref_tracker_alloc+0x14e/0x4b0 lib/ref_tracker.c:85
 __netdev_tracker_alloc include/linux/netdevice.h:4051 [inline]
 netdev_hold include/linux/netdevice.h:4080 [inline]
 netdev_queue_add_kobject net/core/net-sysfs.c:1661 [inline]
 netdev_queue_update_kobjects+0x18d/0x480 net/core/net-sysfs.c:1716
 register_queue_kobjects net/core/net-sysfs.c:1777 [inline]
 netdev_register_kobject+0x273/0x320 net/core/net-sysfs.c:2017
 register_netdevice+0x12dc/0x1b00 net/core/dev.c:10230
 xfrmi_create net/xfrm/xfrm_interface_core.c:253 [inline]
 xfrmi_newlink+0x4fe/0x740 net/xfrm/xfrm_interface_core.c:851
 rtnl_newlink_create net/core/rtnetlink.c:3422 [inline]
 __rtnl_newlink net/core/rtnetlink.c:3642 [inline]
 rtnl_newlink+0x1542/0x2080 net/core/rtnetlink.c:3655

Memory state around the buggy address:
 ffff888072e66100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888072e66180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888072e66200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                      ^
 ffff888072e66280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888072e66300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/03/26 15:32 linux-6.1.y 1989cd3d56e2 766b6434 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in __ethtool_get_link_ksettings
2026/02/17 03:20 linux-6.1.y 8ce36b2849ef e439b951 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in __ethtool_get_link_ksettings
2026/02/28 06:55 linux-6.1.y 779f9571ac3e 43249bac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in __ethtool_get_link_ksettings
* Struck through repros no longer work on HEAD.