================================================================== BUG: KASAN: use-after-free in ethnl_bitmap32_not_zero net/ethtool/bitset.c:112 [inline] BUG: KASAN: use-after-free in ethnl_compact_sanity_checks net/ethtool/bitset.c:526 [inline] BUG: KASAN: use-after-free in ethnl_update_bitset32.part.5+0x7c7/0x1830 net/ethtool/bitset.c:569 Read of size 4 at addr ffff8880a8bf243c by task syz-executor.2/8662 CPU: 0 PID: 8662 Comm: syz-executor.2 Not tainted 5.5.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x12d/0x187 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x31d mm/kasan/report.c:374 __kasan_report.cold.11+0x1b/0x3a mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:134 ethnl_bitmap32_not_zero net/ethtool/bitset.c:112 [inline] ethnl_compact_sanity_checks net/ethtool/bitset.c:526 [inline] ethnl_update_bitset32.part.5+0x7c7/0x1830 net/ethtool/bitset.c:569 ethnl_update_bitset32 net/ethtool/bitset.c:730 [inline] ethnl_update_bitset+0xe/0x13 net/ethtool/bitset.c:731 ethnl_update_linkmodes net/ethtool/linkmodes.c:303 [inline] ethnl_set_linkmodes+0x3b8/0xae0 net/ethtool/linkmodes.c:359 genl_family_rcv_msg_doit net/netlink/genetlink.c:672 [inline] genl_family_rcv_msg net/netlink/genetlink.c:717 [inline] genl_rcv_msg+0x5d9/0x10e0 net/netlink/genetlink.c:734 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2477 genl_rcv+0x23/0x40 net/netlink/genetlink.c:745 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x45e/0x6a0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x7b0/0xcb0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:643 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:663 ____sys_sendmsg+0x603/0x950 net/socket.c:2342 ___sys_sendmsg+0xe4/0x160 net/socket.c:2396 __sys_sendmsg+0xd9/0x180 net/socket.c:2429 __do_sys_sendmsg net/socket.c:2438 [inline] __se_sys_sendmsg net/socket.c:2436 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2436 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c429 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f7b68546c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f7b685476d4 RCX: 000000000045c429 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000003 RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000904 R14: 00000000004d4f90 R15: 000000000076bf2c Allocated by task 8623: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc.constprop.17+0xc7/0xd0 mm/kasan/common.c:513 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:527 __do_kmalloc_node mm/slab.c:3616 [inline] __kmalloc_node_track_caller+0x4d/0x70 mm/slab.c:3630 __kmalloc_reserve.isra.46+0x2c/0xc0 net/core/skbuff.c:141 __alloc_skb+0xd7/0x570 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1049 [inline] alloc_uevent_skb+0x84/0x220 lib/kobject_uevent.c:289 uevent_net_broadcast_tagged lib/kobject_uevent.c:350 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:411 [inline] kobject_uevent_env+0xbf1/0xe90 lib/kobject_uevent.c:592 kobject_uevent+0xb/0x10 lib/kobject_uevent.c:641 rx_queue_add_kobject net/core/net-sysfs.c:939 [inline] net_rx_queue_update_kobjects+0xab/0x3a0 net/core/net-sysfs.c:961 register_queue_kobjects net/core/net-sysfs.c:1536 [inline] netdev_register_kobject+0x249/0x360 net/core/net-sysfs.c:1759 register_netdevice+0x489/0xf00 net/core/dev.c:9333 __rtnl_newlink+0x1091/0x1480 net/core/rtnetlink.c:3322 rtnl_newlink+0x61/0x90 net/core/rtnetlink.c:3368 rtnetlink_rcv_msg+0x34a/0x8d0 net/core/rtnetlink.c:5429 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:5447 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x45e/0x6a0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x7b0/0xcb0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:643 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:663 __sys_sendto+0x1f2/0x2e0 net/socket.c:1997 __do_sys_sendto net/socket.c:2009 [inline] __se_sys_sendto net/socket.c:2005 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:2005 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8623: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kfree+0x108/0x2c0 mm/slab.c:3757 skb_free_head+0x6e/0x90 net/core/skbuff.c:591 skb_release_data+0x27f/0x3f0 net/core/skbuff.c:611 skb_release_all+0x3d/0x50 net/core/skbuff.c:665 __kfree_skb net/core/skbuff.c:679 [inline] consume_skb+0xad/0x2d0 net/core/skbuff.c:838 netlink_broadcast_filtered+0x2b9/0xaa0 net/netlink/af_netlink.c:1512 netlink_broadcast+0xe/0x10 net/netlink/af_netlink.c:1534 uevent_net_broadcast_tagged lib/kobject_uevent.c:371 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:411 [inline] kobject_uevent_env+0xc97/0xe90 lib/kobject_uevent.c:592 kobject_uevent+0xb/0x10 lib/kobject_uevent.c:641 rx_queue_add_kobject net/core/net-sysfs.c:939 [inline] net_rx_queue_update_kobjects+0xab/0x3a0 net/core/net-sysfs.c:961 register_queue_kobjects net/core/net-sysfs.c:1536 [inline] netdev_register_kobject+0x249/0x360 net/core/net-sysfs.c:1759 register_netdevice+0x489/0xf00 net/core/dev.c:9333 __rtnl_newlink+0x1091/0x1480 net/core/rtnetlink.c:3322 rtnl_newlink+0x61/0x90 net/core/rtnetlink.c:3368 rtnetlink_rcv_msg+0x34a/0x8d0 net/core/rtnetlink.c:5429 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:5447 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x45e/0x6a0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x7b0/0xcb0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:643 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:663 __sys_sendto+0x1f2/0x2e0 net/socket.c:1997 __do_sys_sendto net/socket.c:2009 [inline] __se_sys_sendto net/socket.c:2005 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:2005 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a8bf2400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 60 bytes inside of 512-byte region [ffff8880a8bf2400, ffff8880a8bf2600) The buggy address belongs to the page: page:ffffea0002a2fc80 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0x0 raw: 00fffe0000000200 ffffea000255ee48 ffffea000222b808 ffff8880aa400a80 raw: 0000000000000000 ffff8880a8bf2000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a8bf2300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a8bf2380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a8bf2400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a8bf2480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a8bf2500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================