================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:199 [inline] BUG: KASAN: use-after-free in __in6_dev_get include/net/addrconf.h:309 [inline] BUG: KASAN: use-after-free in ip6_ignore_linkdown include/net/addrconf.h:400 [inline] BUG: KASAN: use-after-free in find_match+0x961/0xb90 net/ipv6/route.c:743 Read of size 8 at addr ffff888077ca0720 by task kworker/u4:0/7 CPU: 1 PID: 7 Comm: kworker/u4:0 Not tainted 5.3.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: bat_events batadv_nc_worker Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x113/0x167 lib/dump_stack.c:113 print_address_description.constprop.8.cold.10+0x9/0x31d mm/kasan/report.c:374 __kasan_report.cold.11+0x1b/0x3a mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 __read_once_size include/linux/compiler.h:199 [inline] __in6_dev_get include/net/addrconf.h:309 [inline] ip6_ignore_linkdown include/net/addrconf.h:400 [inline] find_match+0x961/0xb90 net/ipv6/route.c:743 __find_rr_leaf+0x190/0x610 net/ipv6/route.c:831 find_rr_leaf net/ipv6/route.c:852 [inline] rt6_select net/ipv6/route.c:896 [inline] fib6_table_lookup+0x539/0x9e0 net/ipv6/route.c:2164 ip6_pol_route+0x1a0/0x7f0 net/ipv6/route.c:2200 ip6_pol_route_input+0x4f/0x80 net/ipv6/route.c:2258 fib6_rule_lookup+0x10c/0x730 net/ipv6/fib6_rules.c:113 ip6_route_input_lookup+0x7e/0x90 net/ipv6/route.c:2270 ip6_route_input+0x4bc/0x840 net/ipv6/route.c:2442 ip6_rcv_finish_core.isra.16+0xce/0x3f0 net/ipv6/ip6_input.c:63 ip6_rcv_finish+0x138/0x290 net/ipv6/ip6_input.c:74 NF_HOOK include/linux/netfilter.h:305 [inline] ipv6_rcv+0xf3/0x310 net/ipv6/ip6_input.c:274 __netif_receive_skb_one_core+0xe9/0x170 net/core/dev.c:5118 __netif_receive_skb+0x1f/0x1b0 net/core/dev.c:5232 process_backlog+0x1ca/0x6d0 net/core/dev.c:6063 napi_poll net/core/dev.c:6500 [inline] net_rx_action+0x458/0xe40 net/core/dev.c:6568 __do_softirq+0x262/0x9a8 kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1082 do_softirq.part.12+0x126/0x160 kernel/softirq.c:337 do_softirq kernel/softirq.c:329 [inline] __local_bh_enable_ip+0x21d/0x260 kernel/softirq.c:189 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:176 [inline] _raw_spin_unlock_bh+0x30/0x40 kernel/locking/spinlock.c:207 spin_unlock_bh include/linux/spinlock.h:383 [inline] batadv_nc_purge_paths+0x1e8/0x310 net/batman-adv/network-coding.c:470 batadv_nc_worker+0x1f3/0x630 net/batman-adv/network-coding.c:719 process_one_work+0x856/0x1630 kernel/workqueue.c:2269 worker_thread+0x85/0xb60 kernel/workqueue.c:2415 kthread+0x331/0x3f0 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 8067: save_stack+0x21/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc.constprop.13+0xc7/0xd0 mm/kasan/common.c:510 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524 __do_kmalloc_node mm/slab.c:3615 [inline] __kmalloc_node+0x4d/0x70 mm/slab.c:3622 kmalloc_node include/linux/slab.h:595 [inline] kvmalloc_node+0x6a/0x80 mm/util.c:564 kvmalloc include/linux/mm.h:670 [inline] kvzalloc include/linux/mm.h:678 [inline] alloc_netdev_mqs+0x5d/0xbf0 net/core/dev.c:9311 rtnl_create_link+0x1e2/0xb90 net/core/rtnetlink.c:2934 __rtnl_newlink+0xbd0/0x1400 net/core/rtnetlink.c:3189 rtnl_newlink+0x61/0x90 net/core/rtnetlink.c:3257 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:5323 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:5341 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x43b/0x640 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x74b/0xbf0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:657 __sys_sendto+0x1f2/0x2e0 net/socket.c:1952 __do_compat_sys_socketcall net/compat.c:771 [inline] __se_compat_sys_socketcall net/compat.c:719 [inline] __ia32_compat_sys_socketcall+0x473/0x610 net/compat.c:719 do_syscall_32_irqs_on arch/x86/entry/common.c:333 [inline] do_fast_syscall_32+0x235/0xb3b arch/x86/entry/common.c:404 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 8395: save_stack+0x21/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:471 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __cache_free mm/slab.c:3425 [inline] kfree+0x108/0x2c0 mm/slab.c:3756 __netdev_name_node_alt_destroy+0x1d0/0x270 net/core/dev.c:321 netdev_name_node_alt_destroy+0x43/0x70 net/core/dev.c:333 rtnl_alt_ifname net/core/rtnetlink.c:3400 [inline] rtnl_linkprop.isra.32+0x4e8/0x630 net/core/rtnetlink.c:3452 rtnl_dellinkprop+0x40/0x60 net/core/rtnetlink.c:3473 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:5323 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:5341 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x43b/0x640 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x74b/0xbf0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:657 ___sys_sendmsg+0x647/0x950 net/socket.c:2311 __sys_sendmsg+0xd9/0x180 net/socket.c:2356 __compat_sys_sendmsg net/compat.c:642 [inline] __do_compat_sys_sendmsg net/compat.c:649 [inline] __se_compat_sys_sendmsg net/compat.c:646 [inline] __ia32_compat_sys_sendmsg+0x75/0xb0 net/compat.c:646 do_syscall_32_irqs_on arch/x86/entry/common.c:333 [inline] do_fast_syscall_32+0x235/0xb3b arch/x86/entry/common.c:404 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 The buggy address belongs to the object at ffff888077ca0400 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 800 bytes inside of 4096-byte region [ffff888077ca0400, ffff888077ca1400) The buggy address belongs to the page: page:ffffea0001df2800 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea0001df1b88 ffffea0001df2888 ffff8880aa402000 raw: 0000000000000000 ffff888077ca0400 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888077ca0600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888077ca0680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888077ca0700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888077ca0780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888077ca0800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================