bond0: Enslaving macvlan2 as an active interface with an up link bond0: Releasing backup interface macvlan2 ================================================================== BUG: KASAN: use-after-free in macvlan_dev_get_iflink+0x5f/0x70 drivers/net/macvlan.c:1101 Read of size 4 at addr ffff8880b4f1c688 by task syz-executor.2/10726 CPU: 0 PID: 10726 Comm: syz-executor.2 Not tainted 4.14.290-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load4_noabort+0x68/0x70 mm/kasan/report.c:429 macvlan_dev_get_iflink+0x5f/0x70 drivers/net/macvlan.c:1101 dev_get_iflink+0x73/0xe0 net/core/dev.c:691 rfc2863_policy+0x163/0x1b0 net/core/link_watch.c:43 linkwatch_do_dev+0x1b/0x100 net/core/link_watch.c:157 linkwatch_forget_dev+0x15c/0x1f0 net/core/link_watch.c:223 netdev_wait_allrefs net/core/dev.c:7846 [inline] netdev_run_todo+0x284/0xad0 net/core/dev.c:7947 rtnl_unlock net/core/rtnetlink.c:106 [inline] rtnetlink_rcv_msg+0x3cb/0xb10 net/core/rtnetlink.c:4324 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2454 netlink_unicast_kernel net/netlink/af_netlink.c:1296 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1322 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062 bond0: Enslaving macvlan2 as an active interface with an up link __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7fc4b4849279 RSP: 002b:00007fc4b319d168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fc4b495c050 RCX: 00007fc4b4849279 RDX: 0000000000000000 RSI: 0000000020000340 RDI: 0000000000000009 RBP: 00007fc4b48a3189 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd8cac29ff R14: 00007fc4b319d300 R15: 0000000000022000 Allocated by task 10723: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node+0x4c/0x70 mm/slab.c:3689 kmalloc_node include/linux/slab.h:530 [inline] kvmalloc_node+0x46/0xd0 mm/util.c:430 kvmalloc include/linux/mm.h:531 [inline] kvzalloc include/linux/mm.h:539 [inline] alloc_netdev_mqs+0x76/0xb70 net/core/dev.c:8112 rtnl_create_link+0x1ab/0x890 net/core/rtnetlink.c:2460 rtnl_newlink+0xe7a/0x1830 net/core/rtnetlink.c:2720 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4322 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2454 netlink_unicast_kernel net/netlink/af_netlink.c:1296 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1322 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 10732: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 kvfree+0x45/0x50 mm/util.c:449 device_release+0x15f/0x1a0 drivers/base/core.c:848 kobject_cleanup lib/kobject.c:646 [inline] kobject_release lib/kobject.c:675 [inline] kref_put include/linux/kref.h:70 [inline] kobject_put+0x251/0x550 lib/kobject.c:692 netdev_run_todo+0x747/0xad0 net/core/dev.c:7969 rtnl_unlock net/core/rtnetlink.c:106 [inline] rtnetlink_rcv_msg+0x3cb/0xb10 net/core/rtnetlink.c:4324 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2454 netlink_unicast_kernel net/netlink/af_netlink.c:1296 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1322 netlink_sendmsg+0x648/0xbc0 net/netlink/af_netlink.c:1893 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x6c8/0x800 net/socket.c:2062 __sys_sendmsg+0xa3/0x120 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x27/0x40 net/socket.c:2103 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8880b4f1c580 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 264 bytes inside of 4096-byte region [ffff8880b4f1c580, ffff8880b4f1d580) The buggy address belongs to the page: page:ffffea0002d3c700 count:1 mapcount:0 mapping:ffff8880b4f1c580 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff8880b4f1c580 0000000000000000 0000000100000001 raw: ffffea000154e3a0 ffffea0002cdb920 ffff88813fe74dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b4f1c580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b4f1c600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880b4f1c680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880b4f1c700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b4f1c780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== print_req_error: I/O error, dev loop1, sector 0