================================================================== BUG: KASAN: slab-out-of-bounds in dsa_user_to_port net/dsa/user.h:58 [inline] BUG: KASAN: slab-out-of-bounds in dsa_user_prechangeupper+0x3a/0x240 net/dsa/user.c:2868 Read of size 8 at addr ffff88806e74acf0 by task syz-executor.0/5660 CPU: 1 PID: 5660 Comm: syz-executor.0 Not tainted 6.7.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x214/0x300 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x142/0x170 mm/kasan/report.c:588 dsa_user_to_port net/dsa/user.h:58 [inline] dsa_user_prechangeupper+0x3a/0x240 net/dsa/user.c:2868 dsa_user_netdevice_event+0x1a37/0x2ab0 net/dsa/user.c:3332 notifier_call_chain+0x16d/0x340 kernel/notifier.c:93 call_netdevice_notifiers_info net/core/dev.c:1967 [inline] __netdev_upper_dev_link+0x7cd/0xab0 net/core/dev.c:7749 netdev_upper_dev_link+0x9e/0xe0 net/core/dev.c:7801 macvlan_common_newlink+0x114e/0x18d0 drivers/net/macvlan.c:1539 macvtap_newlink+0x154/0x1d0 drivers/net/macvtap.c:108 rtnl_newlink_create net/core/rtnetlink.c:3515 [inline] __rtnl_newlink net/core/rtnetlink.c:3735 [inline] rtnl_newlink+0x1551/0x2040 net/core/rtnetlink.c:3748 rtnetlink_rcv_msg+0xc1f/0xe60 net/core/rtnetlink.c:6615 netlink_rcv_skb+0x1df/0x430 net/netlink/af_netlink.c:2543 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline] netlink_unicast+0x7b6/0x940 net/netlink/af_netlink.c:1367 netlink_sendmsg+0xa0e/0xd20 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x592/0x890 net/socket.c:2584 ___sys_sendmsg+0x27a/0x300 net/socket.c:2638 __sys_sendmsg net/socket.c:2667 [inline] __do_sys_sendmsg net/socket.c:2676 [inline] __se_sys_sendmsg+0x1b3/0x290 net/socket.c:2674 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f96ea67cd29 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 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 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f96eb3bf0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f96ea7abf80 RCX: 00007f96ea67cd29 RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000005 RBP: 00007f96ea6c947a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f96ea7abf80 R15: 00007fff3caf1318 Allocated by task 5593: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc_node+0xad/0x1d0 mm/slab_common.c:1014 kmalloc_node include/linux/slab.h:620 [inline] kvmalloc_node+0x72/0x150 mm/util.c:617 kvmalloc include/linux/slab.h:738 [inline] kvzalloc include/linux/slab.h:746 [inline] alloc_netdev_mqs+0x9d/0x14d0 net/core/dev.c:10827 rtnl_create_link+0x2ea/0xc10 net/core/rtnetlink.c:3379 rtnl_newlink_create net/core/rtnetlink.c:3505 [inline] __rtnl_newlink net/core/rtnetlink.c:3735 [inline] rtnl_newlink+0x13ed/0x2040 net/core/rtnetlink.c:3748 rtnetlink_rcv_msg+0xc1f/0xe60 net/core/rtnetlink.c:6615 netlink_rcv_skb+0x1df/0x430 net/netlink/af_netlink.c:2543 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline] netlink_unicast+0x7b6/0x940 net/netlink/af_netlink.c:1367 netlink_sendmsg+0xa0e/0xd20 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] __sys_sendto+0x5a7/0x7c0 net/socket.c:2190 __do_sys_sendto net/socket.c:2202 [inline] __se_sys_sendto net/socket.c:2198 [inline] __x64_sys_sendto+0xde/0xf0 net/socket.c:2198 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff88806e74a000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 3312 bytes inside of allocated 3319-byte region [ffff88806e74a000, ffff88806e74acf7) The buggy address belongs to the physical page: page:ffffea0001b9d200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6e748 head:ffffea0001b9d200 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88801e28db81 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888011c4f500 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88801e28db81 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 5593, tgid 5593 (syz-executor.0), ts 74232854607, free_ts 51365657187 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x10b/0x130 mm/page_alloc.c:1544 prep_new_page mm/page_alloc.c:1551 [inline] get_page_from_freelist+0x345c/0x35f0 mm/page_alloc.c:3319 __alloc_pages+0x255/0x650 mm/page_alloc.c:4575 alloc_pages_mpol+0x3de/0x690 mm/mempolicy.c:2133 alloc_slab_page+0x6a/0x170 mm/slub.c:1870 allocate_slab mm/slub.c:2017 [inline] new_slab+0x70/0x270 mm/slub.c:2070 ___slab_alloc+0x94b/0xee0 mm/slub.c:3223 __slab_alloc mm/slub.c:3322 [inline] __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x1f7/0x2c0 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc_node_track_caller+0x9a/0x1c0 mm/slab_common.c:1027 kmemdup+0x2a/0x60 mm/util.c:131 __addrconf_sysctl_register+0xb1/0x3f0 net/ipv6/addrconf.c:7137 addrconf_sysctl_register+0x149/0x1a0 net/ipv6/addrconf.c:7203 ipv6_add_dev+0xd1f/0x1210 net/ipv6/addrconf.c:453 addrconf_notify+0x563/0xe50 net/ipv6/addrconf.c:3601 notifier_call_chain+0x16d/0x340 kernel/notifier.c:93 call_netdevice_notifiers_info net/core/dev.c:1967 [inline] call_netdevice_notifiers_extack net/core/dev.c:2005 [inline] call_netdevice_notifiers+0x122/0x170 net/core/dev.c:2019 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1144 [inline] free_unref_page_prepare+0x82b/0x940 mm/page_alloc.c:2354 free_unref_page+0x37/0x3a0 mm/page_alloc.c:2494 vfree+0x175/0x2a0 mm/vmalloc.c:2842 do_free_pages sound/core/pcm_memory.c:93 [inline] snd_pcm_lib_free_pages+0x1a1/0x260 sound/core/pcm_memory.c:499 do_hw_free sound/core/pcm_native.c:876 [inline] snd_pcm_release_substream+0x2be/0x480 sound/core/pcm_native.c:2709 snd_pcm_oss_release_file sound/core/oss/pcm_oss.c:2413 [inline] snd_pcm_oss_release+0x1a8/0x270 sound/core/oss/pcm_oss.c:2592 __fput+0x3bb/0x9d0 fs/file_table.c:394 __do_sys_close fs/open.c:1587 [inline] __se_sys_close+0x15f/0x220 fs/open.c:1572 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Memory state around the buggy address: ffff88806e74ab80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806e74ac00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806e74ac80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 fc ^ ffff88806e74ad00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806e74ad80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================