syzbot


KASAN: use-after-free Read in icmp6_send

Status: closed as invalid on 2019/05/15 23:07
Subsystems: net
[Documentation on labels]
First crash: 1824d, last: 1824d

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in atomic_read include/asm-generic/atomic-instrumented.h:26 [inline]
BUG: KASAN: use-after-free in queued_spin_trylock include/asm-generic/qspinlock.h:69 [inline]
BUG: KASAN: use-after-free in do_raw_spin_trylock+0x6a/0x180 kernel/locking/spinlock_debug.c:119
Read of size 4 at addr ffff88808479e538 by task syz-executor.3/18663

CPU: 0 PID: 18663 Comm: syz-executor.3 Not tainted 5.1.0-rc6+ #156
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+0x172/0x1f0 lib/dump_stack.c:113
 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187
 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317
 check_memory_region_inline mm/kasan/generic.c:185 [inline]
 check_memory_region+0x123/0x190 mm/kasan/generic.c:191
 kasan_check_read+0x11/0x20 mm/kasan/common.c:102
 atomic_read include/asm-generic/atomic-instrumented.h:26 [inline]
 queued_spin_trylock include/asm-generic/qspinlock.h:69 [inline]
 do_raw_spin_trylock+0x6a/0x180 kernel/locking/spinlock_debug.c:119
 __raw_spin_trylock include/linux/spinlock_api_smp.h:89 [inline]
 _raw_spin_trylock+0x1c/0x80 kernel/locking/spinlock.c:128
 spin_trylock include/linux/spinlock.h:339 [inline]
 icmpv6_xmit_lock net/ipv6/icmp.c:121 [inline]
 icmp6_send+0xfe8/0x1e50 net/ipv6/icmp.c:533
 icmpv6_send+0xee/0x230 net/ipv6/ip6_icmp.c:43
 ip6_link_failure+0x2b/0x530 net/ipv6/route.c:2280
 dst_link_failure include/net/dst.h:416 [inline]
 ipip6_tunnel_xmit net/ipv6/sit.c:1001 [inline]
 sit_tunnel_xmit+0x15a5/0x2840 net/ipv6/sit.c:1038
 __netdev_start_xmit include/linux/netdevice.h:4431 [inline]
 netdev_start_xmit include/linux/netdevice.h:4445 [inline]
 xmit_one net/core/dev.c:3292 [inline]
 dev_hard_start_xmit+0x18f/0x960 net/core/dev.c:3308
 __dev_queue_xmit+0x2a9d/0x36c0 net/core/dev.c:3881
 dev_queue_xmit+0x18/0x20 net/core/dev.c:3914
 neigh_direct_output+0x16/0x20 net/core/neighbour.c:1527
 neigh_output include/net/neighbour.h:511 [inline]
 ip6_finish_output2+0x1032/0x2550 net/ipv6/ip6_output.c:120
 ip6_finish_output+0x579/0xc30 net/ipv6/ip6_output.c:154
 NF_HOOK_COND include/linux/netfilter.h:285 [inline]
 ip6_output+0x235/0x7f0 net/ipv6/ip6_output.c:171
 dst_output include/net/dst.h:433 [inline]
 NF_HOOK include/linux/netfilter.h:296 [inline]
 NF_HOOK include/linux/netfilter.h:290 [inline]
 ip6_xmit+0xe41/0x20c0 net/ipv6/ip6_output.c:275
 inet6_csk_xmit+0x2fb/0x5d0 net/ipv6/inet6_connection_sock.c:139
 __tcp_transmit_skb+0x1a32/0x3750 net/ipv4/tcp_output.c:1155
 tcp_transmit_skb net/ipv4/tcp_output.c:1171 [inline]
 tcp_send_syn_data net/ipv4/tcp_output.c:3491 [inline]
 tcp_connect+0x1e47/0x4280 net/ipv4/tcp_output.c:3530
 tcp_v6_connect+0x150b/0x20a0 net/ipv6/tcp_ipv6.c:331
 __inet_stream_connect+0x83f/0xea0 net/ipv4/af_inet.c:659
 tcp_sendmsg_fastopen net/ipv4/tcp.c:1155 [inline]
 tcp_sendmsg_locked+0x231f/0x37f0 net/ipv4/tcp.c:1197
 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1431
 inet_sendmsg+0x147/0x5e0 net/ipv4/af_inet.c:802
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xdd/0x130 net/socket.c:661
 __sys_sendto+0x262/0x380 net/socket.c:1952
 __do_sys_sendto net/socket.c:1964 [inline]
 __se_sys_sendto net/socket.c:1960 [inline]
 __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1960
 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x458da9
Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007faadc6cac78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 0000000000458da9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 000000000073c040 R08: 000000002031e000 R09: 000000000000001c
R10: 0000000020000004 R11: 0000000000000246 R12: 00007faadc6cb6d4
R13: 00000000004c6732 R14: 00000000004db0f0 R15: 00000000ffffffff

Allocated by task 3876:
 save_stack+0x45/0xd0 mm/kasan/common.c:75
 set_track mm/kasan/common.c:87 [inline]
 __kasan_kmalloc mm/kasan/common.c:497 [inline]
 __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470
 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:505
 slab_post_alloc_hook mm/slab.h:437 [inline]
 slab_alloc mm/slab.c:3393 [inline]
 kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3555
 getname_flags fs/namei.c:138 [inline]
 getname_flags+0xd6/0x5b0 fs/namei.c:128
 getname fs/namei.c:209 [inline]
 do_renameat2+0x199/0xc40 fs/namei.c:4543
 __do_sys_rename fs/namei.c:4671 [inline]
 __se_sys_rename fs/namei.c:4669 [inline]
 __x64_sys_rename+0x61/0x80 fs/namei.c:4669
 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 3876:
 save_stack+0x45/0xd0 mm/kasan/common.c:75
 set_track mm/kasan/common.c:87 [inline]
 __kasan_slab_free+0x102/0x150 mm/kasan/common.c:459
 kasan_slab_free+0xe/0x10 mm/kasan/common.c:467
 __cache_free mm/slab.c:3499 [inline]
 kmem_cache_free+0x86/0x260 mm/slab.c:3765
 putname+0xef/0x130 fs/namei.c:259
 do_renameat2+0x2b4/0xc40 fs/namei.c:4647
 __do_sys_rename fs/namei.c:4671 [inline]
 __se_sys_rename fs/namei.c:4669 [inline]
 __x64_sys_rename+0x61/0x80 fs/namei.c:4669
 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff88808479e300
 which belongs to the cache names_cache of size 4096
The buggy address is located 568 bytes inside of
 4096-byte region [ffff88808479e300, ffff88808479f300)
The buggy address belongs to the page:
page:ffffea000211e780 count:1 mapcount:0 mapping:ffff88812c2d8dc0 index:0x0 compound_mapcount: 0
flags: 0x1fffc0000010200(slab|head)
raw: 01fffc0000010200 ffffea0001c7a088 ffffea00026f3088 ffff88812c2d8dc0
raw: 0000000000000000 ffff88808479e300 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88808479e400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88808479e480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88808479e500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                        ^
 ffff88808479e580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88808479e600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/04/27 09:30 net-next-old 30e5a9a5ba85 b617407b .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.