================================================================== BUG: KASAN: use-after-free in ip6_dst_idev include/net/ip6_fib.h:141 [inline] BUG: KASAN: use-after-free in ip6_xmit+0x177c/0x1a00 net/ipv6/ip6_output.c:237 Read of size 8 at addr ffff8801c918b8d8 by task syz-executor0/19133 input: syz1 as /devices/virtual/input/input278 CPU: 1 PID: 19133 Comm: syz-executor0 Not tainted 4.4.150-g5541782 #83 input: syz1 as /devices/virtual/input/input279 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 4a71e2115b06ea60 ffff8801cb15f5c8 ffffffff81e14e2d ffffea00072462c0 ffff8801c918b8d8 0000000000000000 ffff8801c918b8d8 0000000000001200 ffff8801cb15f600 ffffffff8151a3f0 ffff8801c918b8d8 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_address_description+0x6c/0x216 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report.cold.7+0x175/0x2f7 mm/kasan/report.c:408 [] __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:429 [] ip6_dst_idev include/net/ip6_fib.h:141 [inline] [] ip6_xmit+0x177c/0x1a00 net/ipv6/ip6_output.c:237 [] inet6_csk_xmit+0x245/0x490 net/ipv6/inet6_connection_sock.c:176 [] l2tp_xmit_core net/l2tp/l2tp_core.c:1084 [inline] [] l2tp_xmit_skb+0xbeb/0xeb0 net/l2tp/l2tp_core.c:1179 [] pppol2tp_sendmsg+0x4e0/0x7d0 net/l2tp/l2tp_ppp.c:355 [] sock_sendmsg_nosec net/socket.c:626 [inline] [] sock_sendmsg+0xcc/0x110 net/socket.c:636 [] ___sys_sendmsg+0x441/0x880 net/socket.c:1963 [] __sys_sendmmsg+0x12e/0x2e0 net/socket.c:2048 [] SYSC_sendmmsg net/socket.c:2078 [inline] [] SyS_sendmmsg+0x35/0x60 net/socket.c:2073 [] entry_SYSCALL_64_fastpath+0x22/0x9e Allocated by task 18109: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:616 [] kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:554 [] slab_post_alloc_hook mm/slub.c:1349 [inline] [] slab_alloc_node mm/slub.c:2615 [inline] [] slab_alloc mm/slub.c:2623 [inline] [] kmem_cache_alloc+0xbe/0x2a0 mm/slub.c:2628 [] dst_alloc+0xb5/0x1a0 net/core/dst.c:210 [] rt_dst_alloc+0x78/0x430 net/ipv4/route.c:1478 [] __mkroute_output net/ipv4/route.c:2132 [inline] [] __ip_route_output_key_hash+0x9ac/0x2380 net/ipv4/route.c:2344 [] __ip_route_output_key include/net/route.h:124 [inline] [] ip_route_output_flow+0x29/0xa0 net/ipv4/route.c:2431 [] ip_route_connect include/net/route.h:304 [inline] [] __ip4_datagram_connect+0x663/0xfe0 net/ipv4/datagram.c:51 [] __ip6_datagram_connect+0x1280/0x1960 net/ipv6/datagram.c:105 [] ip6_datagram_connect+0x2f/0x50 net/ipv6/datagram.c:223 [] inet_dgram_connect+0x117/0x200 net/ipv4/af_inet.c:550 [] SYSC_connect+0x1b8/0x300 net/socket.c:1558 [] SyS_connect+0x24/0x30 net/socket.c:1539 [] entry_SYSCALL_64_fastpath+0x22/0x9e Freed by task 3907: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:589 [] slab_free_hook mm/slub.c:1383 [inline] [] slab_free_freelist_hook mm/slub.c:1405 [inline] [] slab_free mm/slub.c:2859 [inline] [] kmem_cache_free+0xbe/0x340 mm/slub.c:2881 [] dst_destroy.part.6+0x1f5/0x330 net/core/dst.c:270 [] dst_destroy net/core/dst.c:252 [inline] [] dst_destroy_rcu+0x15/0x40 net/core/dst.c:295 [] __rcu_reclaim kernel/rcu/rcu.h:118 [inline] [] rcu_do_batch kernel/rcu/tree.c:2705 [inline] [] invoke_rcu_callbacks kernel/rcu/tree.c:2973 [inline] [] __rcu_process_callbacks kernel/rcu/tree.c:2940 [inline] [] rcu_process_callbacks+0x927/0x1440 kernel/rcu/tree.c:2957 [] __do_softirq+0x22c/0xa1a kernel/softirq.c:273 The buggy address belongs to the object at ffff8801c918b8c0 which belongs to the cache ip_dst_cache of size 208 The buggy address is located 24 bytes inside of 208-byte region [ffff8801c918b8c0, ffff8801c918b990) The buggy address belongs to the page: BUG: unable to handle kernel paging request at ffffed043960d057 IP: [] ns_of_pid include/linux/pid.h:140 [inline] IP: [] task_active_pid_ns+0x8d/0xd0 kernel/pid.c:546 PGD 21ff6a067 PUD 0 Oops: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 19184 Comm: blkid Not tainted 4.4.150-g5541782 #83 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8800b7a41800 task.stack: ffff8800b6668000 RIP: 0010:[] [] ns_of_pid include/linux/pid.h:140 [inline] RIP: 0010:[] [] task_active_pid_ns+0x8d/0xd0 kernel/pid.c:546 RSP: 0018:ffff8800b666fd00 EFLAGS: 00010a02 RAX: dffffc0000000000 RBX: ffff8801cb094280 RCX: 0000000000000000 RDX: 1ffff1043960d057 RSI: ffffffff8118be62 RDI: ffff8821cb0682b8 RBP: ffff8800b666fd10 R08: ffff8800b666f970 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 00000000ffffea00 R13: ffff8800b7a41ff0 R14: ffff8800b7a41c98 R15: ffff8801d0f3b700 FS: 0000000000000000(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffed043960d057 CR3: 000000000440c000 CR4: 00000000001606f0 Stack: ffff8800b7a41800 ffff8800b6670000 ffff8800b666fd60 ffffffff812f0764 ffffffff81527470 ffff8801d0f3b700 ffff8801d0f3bb28 ffff8800b7a41800 ffff8800b6670000 ffff8800b7a41ff0 ffff8800b7a41c98 ffff8801d0f3b700 Call Trace: [] acct_process+0x24/0x4d0 kernel/acct.c:596 [] do_exit+0x1495/0x26b0 kernel/exit.c:745 [] do_group_exit+0x111/0x330 kernel/exit.c:885 [] SYSC_exit_group kernel/exit.c:896 [inline] [] SyS_exit_group+0x1d/0x20 kernel/exit.c:894 [] entry_SYSCALL_64_fastpath+0x22/0x9e Code: c0 03 38 d0 7c 04 84 d2 75 4c 44 8b 63 04 4c 89 e0 48 c1 e0 05 48 8d 7c 03 38 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 36 49 c1 e4 05 4a 8b 5c 23 38 e8 1f 86 1c 00 48 RIP [] ns_of_pid include/linux/pid.h:140 [inline] RIP [] task_active_pid_ns+0x8d/0xd0 kernel/pid.c:546 RSP CR2: ffffed043960d057 ---[ end trace 9fcbb2a30abe3af0 ]---