IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready 8021q: adding VLAN 0 to HW filter on device batadv0 ================================================================== BUG: KASAN: use-after-free in batadv_interface_tx+0x160a/0x18b0 net/batman-adv/soft-interface.c:226 Read of size 2 at addr ffff88808e011acb by task syz-executor617/7908 CPU: 1 PID: 7908 Comm: syz-executor617 Not tainted 4.20.0+ #251 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+0x1d3/0x2c6 lib/dump_stack.c:113 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 __asan_report_load_n_noabort+0xf/0x20 mm/kasan/report.c:443 batadv_interface_tx+0x160a/0x18b0 net/batman-adv/soft-interface.c:226 __netdev_start_xmit include/linux/netdevice.h:4382 [inline] netdev_start_xmit include/linux/netdevice.h:4391 [inline] dev_direct_xmit+0x36c/0x6a0 net/core/dev.c:3930 packet_direct_xmit+0xfb/0x170 net/packet/af_packet.c:246 packet_snd net/packet/af_packet.c:2932 [inline] packet_sendmsg+0x298a/0x6ad0 net/packet/af_packet.c:2957 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:631 __sys_sendto+0x3d7/0x670 net/socket.c:1788 __do_sys_sendto net/socket.c:1800 [inline] __se_sys_sendto net/socket.c:1796 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1796 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x441619 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 3b 0b fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffdf9cfe6e8 EFLAGS: 00000212 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441619 RDX: 000000000000000e RSI: 0000000020000180 RDI: 0000000000000003 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004025e0 R13: 0000000000402670 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 7908: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc_node mm/slab.c:3684 [inline] __kmalloc_node_track_caller+0x50/0x70 mm/slab.c:3698 __kmalloc_reserve.isra.40+0x41/0xe0 net/core/skbuff.c:140 __alloc_skb+0x155/0x760 net/core/skbuff.c:208 alloc_skb include/linux/skbuff.h:1011 [inline] nlmsg_new include/net/netlink.h:654 [inline] mpls_netconf_notify_devconf+0x52/0x120 net/mpls/af_mpls.c:1189 mpls_dev_sysctl_register+0x212/0x2e0 net/mpls/af_mpls.c:1389 mpls_add_dev net/mpls/af_mpls.c:1436 [inline] mpls_dev_notify+0x338/0xba0 net/mpls/af_mpls.c:1562 notifier_call_chain+0x17e/0x380 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1739 call_netdevice_notifiers_extack net/core/dev.c:1751 [inline] call_netdevice_notifiers net/core/dev.c:1765 [inline] register_netdevice+0xb7d/0x11a0 net/core/dev.c:8658 __ip_tunnel_create+0x361/0x550 net/ipv4/ip_tunnel.c:282 ip_tunnel_init_net+0x3fc/0xac0 net/ipv4/ip_tunnel.c:1029 ipgre_tap_init_net+0x29/0x30 net/ipv4/ip_gre.c:1635 ops_init+0x101/0x560 net/core/net_namespace.c:129 setup_net+0x362/0x8d0 net/core/net_namespace.c:314 copy_net_ns+0x2b1/0x4a0 net/core/net_namespace.c:437 create_new_namespaces+0x6ad/0x900 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xc3/0x1f0 kernel/nsproxy.c:206 ksys_unshare+0x79c/0x10b0 kernel/fork.c:2544 __do_sys_unshare kernel/fork.c:2612 [inline] __se_sys_unshare kernel/fork.c:2610 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2610 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7908: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 skb_free_head+0x93/0xb0 net/core/skbuff.c:553 skb_release_data+0x706/0x990 net/core/skbuff.c:573 skb_release_all+0x4a/0x60 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] consume_skb+0x1ae/0x570 net/core/skbuff.c:701 netlink_broadcast_filtered+0x6e6/0x1680 net/netlink/af_netlink.c:1512 netlink_broadcast net/netlink/af_netlink.c:1534 [inline] nlmsg_multicast include/net/netlink.h:734 [inline] nlmsg_notify+0xa0/0x1a0 net/netlink/af_netlink.c:2520 rtnl_notify+0xce/0xf0 net/core/rtnetlink.c:742 mpls_netconf_notify_devconf+0xb1/0x120 net/mpls/af_mpls.c:1201 mpls_dev_sysctl_register+0x212/0x2e0 net/mpls/af_mpls.c:1389 mpls_add_dev net/mpls/af_mpls.c:1436 [inline] mpls_dev_notify+0x338/0xba0 net/mpls/af_mpls.c:1562 notifier_call_chain+0x17e/0x380 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1739 call_netdevice_notifiers_extack net/core/dev.c:1751 [inline] call_netdevice_notifiers net/core/dev.c:1765 [inline] register_netdevice+0xb7d/0x11a0 net/core/dev.c:8658 __ip_tunnel_create+0x361/0x550 net/ipv4/ip_tunnel.c:282 ip_tunnel_init_net+0x3fc/0xac0 net/ipv4/ip_tunnel.c:1029 ipgre_tap_init_net+0x29/0x30 net/ipv4/ip_gre.c:1635 ops_init+0x101/0x560 net/core/net_namespace.c:129 setup_net+0x362/0x8d0 net/core/net_namespace.c:314 copy_net_ns+0x2b1/0x4a0 net/core/net_namespace.c:437 create_new_namespaces+0x6ad/0x900 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xc3/0x1f0 kernel/nsproxy.c:206 ksys_unshare+0x79c/0x10b0 kernel/fork.c:2544 __do_sys_unshare kernel/fork.c:2612 [inline] __se_sys_unshare kernel/fork.c:2610 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2610 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88808e011a40 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 139 bytes inside of 512-byte region [ffff88808e011a40, ffff88808e011c40) The buggy address belongs to the page: page:ffffea0002380440 count:1 mapcount:0 mapping:ffff88812c3f0940 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00023ed688 ffffea00024310c8 ffff88812c3f0940 raw: 0000000000000000 ffff88808e011040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808e011980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88808e011a00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff88808e011a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808e011b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808e011b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================