================================================================== BUG: KASAN: slab-out-of-bounds in ether_addr_equal include/linux/etherdevice.h:349 [inline] BUG: KASAN: slab-out-of-bounds in ipvlan_xmit_mode_l2 drivers/net/ipvlan/ipvlan_core.c:599 [inline] BUG: KASAN: slab-out-of-bounds in ipvlan_queue_xmit+0x1731/0x19d0 drivers/net/ipvlan/ipvlan_core.c:645 Read of size 4 at addr ffff888079511bff by task syz-executor.0/27557 CPU: 0 PID: 27557 Comm: syz-executor.0 Not tainted 5.16.0-rc8-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x320 mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:450 ether_addr_equal include/linux/etherdevice.h:349 [inline] ipvlan_xmit_mode_l2 drivers/net/ipvlan/ipvlan_core.c:599 [inline] ipvlan_queue_xmit+0x1731/0x19d0 drivers/net/ipvlan/ipvlan_core.c:645 ipvlan_start_xmit+0x45/0x190 drivers/net/ipvlan/ipvlan_main.c:222 __netdev_start_xmit include/linux/netdevice.h:4994 [inline] netdev_start_xmit include/linux/netdevice.h:5008 [inline] __dev_direct_xmit+0x530/0x740 net/core/dev.c:4297 dev_direct_xmit include/linux/netdevice.h:2978 [inline] packet_direct_xmit+0x1b8/0x2c0 net/packet/af_packet.c:281 packet_snd net/packet/af_packet.c:3052 [inline] packet_sendmsg+0x2223/0x5280 net/packet/af_packet.c:3079 sock_sendmsg_nosec net/socket.c:704 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:724 __sys_sendto+0x21c/0x320 net/socket.c:2036 __do_sys_sendto net/socket.c:2048 [inline] __se_sys_sendto net/socket.c:2044 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2044 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f4445441e99 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4443d75168 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f4445555100 RCX: 00007f4445441e99 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000026 RBP: 00007f444549bff1 R08: 0000000020000040 R09: 0000000000000014 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd178e4d4f R14: 00007f4443d75300 R15: 0000000000022000 Allocated by task 26931: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:522 kmalloc_node include/linux/slab.h:613 [inline] kvmalloc_node+0x61/0x120 mm/util.c:587 kvmalloc include/linux/slab.h:741 [inline] kvmalloc_array include/linux/slab.h:759 [inline] __ptr_ring_init_queue_alloc include/linux/ptr_ring.h:471 [inline] ptr_ring_init include/linux/ptr_ring.h:489 [inline] skb_array_init include/linux/skb_array.h:182 [inline] pfifo_fast_init+0xea/0x3c0 net/sched/sch_generic.c:805 qdisc_create_dflt+0x101/0x4b0 net/sched/sch_generic.c:952 mq_init+0x358/0x4b0 net/sched/sch_mq.c:90 qdisc_create_dflt+0x101/0x4b0 net/sched/sch_generic.c:952 attach_default_qdiscs net/sched/sch_generic.c:1115 [inline] dev_activate+0x809/0xa70 net/sched/sch_generic.c:1166 __dev_open+0x380/0x4d0 net/core/dev.c:1499 __dev_change_flags+0x583/0x750 net/core/dev.c:8796 dev_change_flags+0x93/0x170 net/core/dev.c:8867 dev_ifsioc+0xb22/0x10c0 net/core/dev_ioctl.c:324 dev_ioctl+0x1b9/0xed0 net/core/dev_ioctl.c:585 sock_do_ioctl+0x15a/0x230 net/socket.c:1132 sock_ioctl+0x2f1/0x640 net/socket.c:1235 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 1781: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free mm/kasan/common.c:328 [inline] __kasan_slab_free+0xff/0x130 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1749 slab_free mm/slub.c:3513 [inline] kfree+0xf6/0x560 mm/slub.c:4561 skb_free_head net/core/skbuff.c:655 [inline] skb_release_data+0x65a/0x790 net/core/skbuff.c:677 skb_release_all net/core/skbuff.c:742 [inline] __kfree_skb net/core/skbuff.c:756 [inline] consume_skb net/core/skbuff.c:912 [inline] consume_skb+0xc2/0x160 net/core/skbuff.c:906 nsim_dev_trap_report drivers/net/netdevsim/dev.c:818 [inline] nsim_dev_trap_report_work+0x85d/0xbc0 drivers/net/netdevsim/dev.c:843 process_one_work+0x9b2/0x1660 kernel/workqueue.c:2298 worker_thread+0x65d/0x1130 kernel/workqueue.c:2445 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888079510000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 3071 bytes to the right of 4096-byte region [ffff888079510000, ffff888079511000) The buggy address belongs to the page: page:ffffea0001e54400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x79510 head:ffffea0001e54400 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010c42140 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 3337, ts 967183419609, free_ts 967112782786 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4149 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5369 alloc_pages+0x1a7/0x300 mm/mempolicy.c:2190 alloc_slab_page mm/slub.c:1793 [inline] allocate_slab mm/slub.c:1930 [inline] new_slab+0x32d/0x4a0 mm/slub.c:1993 ___slab_alloc+0x918/0xfe0 mm/slub.c:3022 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3109 slab_alloc_node mm/slub.c:3200 [inline] slab_alloc mm/slub.c:3242 [inline] kmem_cache_alloc_trace+0x289/0x2c0 mm/slub.c:3259 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:724 [inline] kobject_uevent_env+0x240/0x1650 lib/kobject_uevent.c:524 rx_queue_add_kobject net/core/net-sysfs.c:1069 [inline] net_rx_queue_update_kobjects+0xf8/0x500 net/core/net-sysfs.c:1109 register_queue_kobjects net/core/net-sysfs.c:1766 [inline] netdev_register_kobject+0x275/0x430 net/core/net-sysfs.c:2014 register_netdevice+0xd31/0x1500 net/core/dev.c:10336 register_netdev+0x2d/0x50 net/core/dev.c:10460 vti6_init_net+0x449/0x860 net/ipv6/ip6_vti.c:1164 ops_init+0xaf/0x470 net/core/net_namespace.c:140 setup_net+0x40f/0xa30 net/core/net_namespace.c:326 copy_net_ns+0x318/0x760 net/core/net_namespace.c:470 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3309 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3388 __unfreeze_partials+0x343/0x360 mm/slub.c:2527 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x5a/0xc0 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0xa2/0xc0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:259 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3234 [inline] slab_alloc mm/slub.c:3242 [inline] kmem_cache_alloc+0x202/0x3a0 mm/slub.c:3247 kmem_cache_zalloc include/linux/slab.h:714 [inline] __kernfs_new_node+0xd4/0x8b0 fs/kernfs/dir.c:585 kernfs_new_node+0x93/0x120 fs/kernfs/dir.c:647 __kernfs_create_file+0x51/0x350 fs/kernfs/file.c:985 sysfs_add_file_mode_ns+0x20f/0x3f0 fs/sysfs/file.c:294 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x322/0xb10 fs/sysfs/group.c:148 internal_create_groups.part.0+0x90/0x140 fs/sysfs/group.c:188 internal_create_groups fs/sysfs/group.c:184 [inline] sysfs_create_groups+0x25/0x50 fs/sysfs/group.c:214 setup_port+0x387/0x15e0 drivers/infiniband/core/sysfs.c:1250 ib_setup_port_attrs+0x1e7/0x5c0 drivers/infiniband/core/sysfs.c:1434 Memory state around the buggy address: ffff888079511a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888079511b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888079511b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888079511c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888079511c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================