================================================================== BUG: KASAN: use-after-free in __dev_queue_xmit+0x33f9/0x3950 net/core/dev.c:3772 Read of size 8 at addr ffff8801cb2f69c0 by task udevd/3421 CPU: 1 PID: 3421 Comm: udevd Not tainted 4.19.0-rc5-next-20180928+ #84 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/0x2c4 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_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __dev_queue_xmit+0x33f9/0x3950 net/core/dev.c:3772 dev_queue_xmit+0x17/0x20 net/core/dev.c:3838 neigh_resolve_output+0x67e/0xae0 net/core/neighbour.c:1364 neigh_output include/net/neighbour.h:483 [inline] ip6_finish_output2+0xc91/0x27a0 net/ipv6/ip6_output.c:120 ip6_finish_output+0x4de/0xbc0 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:276 [inline] ip6_output+0x23e/0x9f0 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:444 [inline] NF_HOOK include/linux/netfilter.h:287 [inline] ndisc_send_skb+0x1005/0x1570 net/ipv6/ndisc.c:491 ndisc_send_rs+0x134/0x6e0 net/ipv6/ndisc.c:685 addrconf_rs_timer+0x314/0x690 net/ipv6/addrconf.c:3820 call_timer_fn+0x26d/0x920 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x7e0/0xc60 kernel/time/timer.c:1682 run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1695 __do_softirq+0x30b/0xb03 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x17f/0x1c0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1cb/0x750 arch/x86/kernel/apic/apic.c:1061 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:804 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:761 [inline] RIP: 0010:qlink_free mm/kasan/quarantine.c:150 [inline] RIP: 0010:qlist_free_all+0xf0/0x140 mm/kasan/quarantine.c:166 Code: c7 40 10 00 00 00 00 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 2f 46 c2 ff 48 83 3d a7 c3 70 07 00 74 45 48 89 df 57 9d <0f> 1f 44 00 00 eb af 48 89 df e8 e1 3c 77 ff 48 b9 00 00 00 00 00 RSP: 0018:ffff8801c7847b10 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 0000000000000286 RCX: ffffffff8183778a RDX: 0000000000000004 RSI: ffffffff818377a4 RDI: 0000000000000286 RBP: ffff8801c7847b40 R08: ffff8801c7838000 R09: fffffbfff1286f6c R10: fffffbfff1286f6c R11: ffffffff89437b63 R12: 0000000000000000 R13: ffff8801d309a108 R14: ffff8801cdaf8da8 R15: ffff8801cb07b780 quarantine_reduce+0x163/0x1a0 mm/kasan/quarantine.c:259 kasan_kmalloc+0x9b/0xe0 mm/kasan/kasan.c:538 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 slab_post_alloc_hook mm/slab.h:444 [inline] slab_alloc mm/slab.c:3392 [inline] kmem_cache_alloc+0x11b/0x730 mm/slab.c:3552 getname_flags+0xd0/0x590 fs/namei.c:140 user_path_at_empty+0x2d/0x50 fs/namei.c:2608 do_readlinkat+0x156/0x410 fs/stat.c:397 __do_sys_readlink fs/stat.c:430 [inline] __se_sys_readlink fs/stat.c:427 [inline] __x64_sys_readlink+0x78/0xb0 fs/stat.c:427 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f09c6a91577 Code: f0 ff ff 77 02 f3 c3 48 8b 15 bd 38 2b 00 f7 d8 64 89 02 83 c8 ff c3 90 90 90 90 90 90 90 90 90 90 90 90 b8 59 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 91 38 2b 00 31 d2 48 29 c2 64 RSP: 002b:00007ffd427707b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000059 RAX: ffffffffffffffda RBX: 0000000002295250 RCX: 00007f09c6a91577 RDX: 0000000000000400 RSI: 00007ffd427707c0 RDI: 00007ffd42770ca0 RBP: 00007ffd42771500 R08: 00007ffd42771500 R09: 00007f09c6ae5de0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd42770ca0 R13: 0000000000000400 R14: 00000000022ae7f0 R15: 0000000002295250 Allocated by task 0: 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:3682 [inline] __kmalloc_node_track_caller+0x47/0x70 mm/slab.c:3696 __kmalloc_reserve.isra.39+0x41/0xe0 net/core/skbuff.c:137 __alloc_skb+0x150/0x770 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:997 [inline] alloc_skb_with_frags+0x133/0x7d0 net/core/skbuff.c:5268 sock_alloc_send_pskb+0x865/0xab0 net/core/sock.c:2082 sock_alloc_send_skb+0x32/0x40 net/core/sock.c:2099 mld_newpack+0x38d/0xa60 net/ipv6/mcast.c:1610 add_grhead.isra.28+0x299/0x370 net/ipv6/mcast.c:1714 add_grec+0xf69/0x1230 net/ipv6/mcast.c:1845 mld_send_cr net/ipv6/mcast.c:1971 [inline] mld_ifc_timer_expire+0x3d2/0x8a0 net/ipv6/mcast.c:2478 call_timer_fn+0x26d/0x920 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x7e0/0xc60 kernel/time/timer.c:1682 run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1695 __do_softirq+0x30b/0xb03 kernel/softirq.c:292 Freed by task 0: 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:3813 skb_free_head+0x99/0xc0 net/core/skbuff.c:550 skb_release_data+0x6a4/0x880 net/core/skbuff.c:570 skb_release_all+0x4a/0x60 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] kfree_skb+0x1b6/0x580 net/core/skbuff.c:659 ip6gre_tunnel_xmit+0x43e/0x1000 net/ipv6/ip6_gre.c:905 __netdev_start_xmit include/linux/netdevice.h:4322 [inline] netdev_start_xmit include/linux/netdevice.h:4331 [inline] xmit_one net/core/dev.c:3219 [inline] dev_hard_start_xmit+0x290/0xc90 net/core/dev.c:3235 sch_direct_xmit+0x48b/0x1130 net/sched/sch_generic.c:327 qdisc_restart net/sched/sch_generic.c:390 [inline] __qdisc_run+0x631/0x1980 net/sched/sch_generic.c:398 qdisc_run include/net/pkt_sched.h:121 [inline] __dev_xmit_skb net/core/dev.c:3414 [inline] __dev_queue_xmit+0x190b/0x3950 net/core/dev.c:3773 dev_queue_xmit+0x17/0x20 net/core/dev.c:3838 neigh_resolve_output+0x67e/0xae0 net/core/neighbour.c:1364 neigh_output include/net/neighbour.h:483 [inline] ip6_finish_output2+0xc91/0x27a0 net/ipv6/ip6_output.c:120 ip6_finish_output+0x4de/0xbc0 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:276 [inline] ip6_output+0x23e/0x9f0 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:444 [inline] NF_HOOK include/linux/netfilter.h:287 [inline] mld_sendpack+0xae7/0xfb0 net/ipv6/mcast.c:1683 mld_send_cr net/ipv6/mcast.c:1979 [inline] mld_ifc_timer_expire+0x447/0x8a0 net/ipv6/mcast.c:2478 call_timer_fn+0x26d/0x920 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x7e0/0xc60 kernel/time/timer.c:1682 run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1695 __do_softirq+0x30b/0xb03 kernel/softirq.c:292 The buggy address belongs to the object at ffff8801cb2f69c0 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 0 bytes inside of 2048-byte region [ffff8801cb2f69c0, ffff8801cb2f71c0) The buggy address belongs to the page: page:ffffea00072cbd80 count:1 mapcount:0 mapping:ffff8801da800c40 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000010200(slab|head) raw: 02fffc0000010200 ffffea0007565088 ffffea0006f81e88 ffff8801da800c40 raw: 0000000000000000 ffff8801cb2f6140 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cb2f6880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cb2f6900: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8801cb2f6980: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8801cb2f6a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cb2f6a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================