==================================================================
BUG: KASAN: use-after-free in tcp_retransmit_timer+0x2c51/0x30e0 net/ipv4/tcp_timer.c:500
Read of size 8 at addr ffff888060da0338 by task syz-executor.0/29482
CPU: 0 PID: 29482 Comm: syz-executor.0 Not tainted 5.6.0-rc1-syzkaller #0
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+0x197/0x210 lib/dump_stack.c:118
print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374
__kasan_report.cold+0x1b/0x32 mm/kasan/report.c:506
kasan_report+0x12/0x20 mm/kasan/common.c:641
__asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135
tcp_retransmit_timer+0x2c51/0x30e0 net/ipv4/tcp_timer.c:500
tcp_write_timer_handler+0x6be/0x8d0 net/ipv4/tcp_timer.c:611
tcp_write_timer+0xac/0x2e0 net/ipv4/tcp_timer.c:631
call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1404
expire_timers kernel/time/timer.c:1449 [inline]
__run_timers kernel/time/timer.c:1773 [inline]
__run_timers kernel/time/timer.c:1740 [inline]
run_timer_softirq+0x6c3/0x1790 kernel/time/timer.c:1786
__do_softirq+0x262/0x98c kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x19b/0x1e0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:546 [inline]
smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1146
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829
RIP: 0010:copy_user_enhanced_fast_string+0xe/0x30 arch/x86/lib/copy_user_64.S:205
Code: 89 d1 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 31 c0 0f 1f 00 c3 0f 1f 80 00 00 00 00 0f 1f 00 83 fa 40 0f 82 70 ff ff ff 89 d1 a4 31 c0 0f 1f 00 c3 66 2e 0f 1f 84 00 00 00 00 00 89 d1 f3 a4
RSP: 0018:ffffc90005327540 EFLAGS: 00010202 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000001 RBX: 0000000000000ec0 RCX: 0000000000000a80
RDX: 0000000000000ec0 RSI: ffff888059c60440 RDI: 0000000020449e00
RBP: ffffc90005327578 R08: ffffed100b38c1d8 R09: 0000000000000000
R10: ffffed100b38c1d7 R11: ffff888059c60ebf R12: 00000000204499c0
R13: ffff888059c60000 R14: 000000002044a880 R15: 00007ffffffff000
_copy_to_iter+0x282/0x1040 lib/iov_iter.c:627
copy_to_iter include/linux/uio.h:138 [inline]
simple_copy_to_iter+0x51/0x70 net/core/datagram.c:522
__skb_datagram_iter+0x108/0x710 net/core/datagram.c:430
skb_copy_datagram_iter+0xab/0x340 net/core/datagram.c:536
skb_copy_datagram_msg include/linux/skbuff.h:3513 [inline]
unix_stream_read_actor+0x7f/0xc0 net/unix/af_unix.c:2459
unix_stream_read_generic+0x91e/0x1e10 net/unix/af_unix.c:2376
unix_stream_recvmsg+0xc3/0x100 net/unix/af_unix.c:2475
sock_recvmsg_nosec net/socket.c:886 [inline]
sock_recvmsg net/socket.c:904 [inline]
sock_recvmsg+0xce/0x110 net/socket.c:900
____sys_recvmsg+0x22c/0x5f0 net/socket.c:2566
___sys_recvmsg+0xe4/0x150 net/socket.c:2608
__sys_recvmsg+0x102/0x1d0 net/socket.c:2642
__do_sys_recvmsg net/socket.c:2652 [inline]
__se_sys_recvmsg net/socket.c:2649 [inline]
__x64_sys_recvmsg+0x78/0xb0 net/socket.c:2649
do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45c449
Code: ad b6 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 b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fbbce5cbc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002f
RAX: ffffffffffffffda RBX: 00007fbbce5cc6d4 RCX: 000000000045c449
RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000003
RBP: 000000000076bfc0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000897 R14: 00000000004cb070 R15: 000000000076bfcc
Allocated by task 9965:
save_stack+0x23/0x90 mm/kasan/common.c:72
set_track mm/kasan/common.c:80 [inline]
__kasan_kmalloc mm/kasan/common.c:515 [inline]
__kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:488
kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:523
slab_post_alloc_hook mm/slab.h:584 [inline]
slab_alloc mm/slab.c:3320 [inline]
kmem_cache_alloc+0x121/0x710 mm/slab.c:3484
kmem_cache_zalloc include/linux/slab.h:659 [inline]
net_alloc net/core/net_namespace.c:403 [inline]
copy_net_ns+0xf1/0x5a0 net/core/net_namespace.c:455
create_new_namespaces+0x403/0xb50 kernel/nsproxy.c:108
unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:229
ksys_unshare+0x444/0x980 kernel/fork.c:2955
__do_sys_unshare kernel/fork.c:3023 [inline]
__se_sys_unshare kernel/fork.c:3021 [inline]
__x64_sys_unshare+0x31/0x40 kernel/fork.c:3021
do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 190:
save_stack+0x23/0x90 mm/kasan/common.c:72
set_track mm/kasan/common.c:80 [inline]
kasan_set_free_info mm/kasan/common.c:337 [inline]
__kasan_slab_free+0x102/0x150 mm/kasan/common.c:476
kasan_slab_free+0xe/0x10 mm/kasan/common.c:485
__cache_free mm/slab.c:3426 [inline]
kmem_cache_free+0x86/0x320 mm/slab.c:3694
net_free net/core/net_namespace.c:431 [inline]
net_drop_ns.part.0+0xa6/0xe0 net/core/net_namespace.c:438
net_drop_ns net/core/net_namespace.c:437 [inline]
cleanup_net+0x803/0xb10 net/core/net_namespace.c:608
process_one_work+0xa05/0x17a0 kernel/workqueue.c:2264
worker_thread+0x98/0xe40 kernel/workqueue.c:2410
kthread+0x361/0x430 kernel/kthread.c:255
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352
The buggy address belongs to the object at ffff888060da0100
which belongs to the cache net_namespace of size 6912
The buggy address is located 568 bytes inside of
6912-byte region [ffff888060da0100, ffff888060da1c00)
The buggy address belongs to the page:
page:ffffea0001836800 refcount:1 mapcount:0 mapping:ffff88821bc53c40 index:0x0 compound_mapcount: 0
flags: 0xfffe0000010200(slab|head)
raw: 00fffe0000010200 ffffea0001a3e108 ffffea000183f388 ffff88821bc53c40
raw: 0000000000000000 ffff888060da0100 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff888060da0200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888060da0280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888060da0300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888060da0380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888060da0400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================