netlink: 12 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 32 bytes leftover after parsing attributes in process `syz-executor.3'. ================================================================== BUG: KASAN: slab-out-of-bounds in vxlan_vnifilter_dump_dev+0x9a0/0xb40 drivers/net/vxlan/vxlan_vnifilter.c:349 Read of size 4 at addr ffff888060d1ce70 by task syz-executor.3/17662 CPU: 0 PID: 17662 Comm: syz-executor.3 Tainted: G W 5.17.0-syzkaller-12888-g77c9387c0c5b #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+0xeb/0x495 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 vxlan_vnifilter_dump_dev+0x9a0/0xb40 drivers/net/vxlan/vxlan_vnifilter.c:349 vxlan_vnifilter_dump+0x3ff/0x650 drivers/net/vxlan/vxlan_vnifilter.c:428 netlink_dump+0x4b5/0xb70 net/netlink/af_netlink.c:2270 __netlink_dump_start+0x647/0x900 net/netlink/af_netlink.c:2375 netlink_dump_start include/linux/netlink.h:245 [inline] rtnetlink_rcv_msg+0x70c/0xb80 net/core/rtnetlink.c:5953 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2496 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x543/0x7f0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x904/0xe00 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:705 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:725 ____sys_sendmsg+0x6e2/0x800 net/socket.c:2413 ___sys_sendmsg+0xf3/0x170 net/socket.c:2467 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2496 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f87b8e89049 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f87b9f73168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f87b8f9bf60 RCX: 00007f87b8e89049 RDX: 0000000000000000 RSI: 00000000200003c0 RDI: 0000000000000004 RBP: 00007f87b8ee308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc3856605f R14: 00007f87b9f73300 R15: 0000000000022000 Allocated by task 0: (stack is not available) The buggy address belongs to the object at ffff888060d1c000 which belongs to the cache kmalloc-cg-8k of size 8192 The buggy address is located 3696 bytes inside of 8192-byte region [ffff888060d1c000, ffff888060d1e000) The buggy address belongs to the physical page: page:ffffea0001834600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x60d18 head:ffffea0001834600 order:3 compound_mapcount:0 compound_pincount:0 memcg:ffff888024583f61 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888010c4c3c0 raw: 0000000000000000 0000000080020002 00000001ffffffff ffff888024583f61 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d60c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 17662, tgid 17661 (syz-executor.3), ts 306397744269, free_ts 306377046966 prep_new_page mm/page_alloc.c:2438 [inline] get_page_from_freelist+0xba2/0x3df0 mm/page_alloc.c:4179 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5405 alloc_pages+0x1aa/0x310 mm/mempolicy.c:2262 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab+0x26c/0x3c0 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0x8df/0xf20 mm/slub.c:3005 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3092 slab_alloc_node mm/slub.c:3183 [inline] __kmalloc_node+0x2cb/0x390 mm/slub.c:4458 kmalloc_node include/linux/slab.h:604 [inline] kvmalloc_node+0xa0/0x130 mm/util.c:580 kvmalloc include/linux/slab.h:731 [inline] kvzalloc include/linux/slab.h:739 [inline] alloc_netdev_mqs+0x98/0x1100 net/core/dev.c:10495 rtnl_create_link+0x9d7/0xc00 net/core/rtnetlink.c:3204 __rtnl_newlink+0xf85/0x1760 net/core/rtnetlink.c:3473 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3531 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5990 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2496 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x543/0x7f0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x904/0xe00 net/netlink/af_netlink.c:1921 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1353 [inline] free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1403 free_unref_page_prepare mm/page_alloc.c:3325 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3420 qlink_free mm/kasan/quarantine.c:157 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:283 ____kasan_kmalloc mm/kasan/common.c:481 [inline] __kasan_kmalloc+0xbd/0xd0 mm/kasan/common.c:524 kmalloc include/linux/slab.h:586 [inline] tomoyo_realpath_from_path+0xc3/0x620 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x272/0x380 security/tomoyo/file.c:771 tomoyo_file_open security/tomoyo/tomoyo.c:311 [inline] tomoyo_file_open+0x9d/0xc0 security/tomoyo/tomoyo.c:306 security_file_open+0x45/0xb0 security/security.c:1651 do_dentry_open+0x349/0x11e0 fs/open.c:811 do_open fs/namei.c:3476 [inline] path_openat+0x1c71/0x2910 fs/namei.c:3609 do_filp_open+0x1aa/0x400 fs/namei.c:3636 do_sys_openat2+0x16d/0x4c0 fs/open.c:1213 do_sys_open fs/open.c:1229 [inline] __do_sys_openat fs/open.c:1245 [inline] __se_sys_openat fs/open.c:1240 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1240 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff888060d1cd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888060d1cd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888060d1ce00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888060d1ce80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888060d1cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================