==================================================================
BUG: KASAN: use-after-free in tcp_probe_timer /net/ipv4/tcp_timer.c:360 [inline]
BUG: KASAN: use-after-free in tcp_write_timer_handler+0x8c6/0x8d0 /net/ipv4/tcp_timer.c:596
Read of size 4 at addr ffff88806766c950 by task syz-executor.5/3704
CPU: 0 PID: 3704 Comm: syz-executor.5 Not tainted 5.2.0+ #66
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+0xd4/0x306 /mm/kasan/report.c:351
__kasan_report.cold+0x1b/0x36 /mm/kasan/report.c:482
kasan_report+0x12/0x20 /mm/kasan/common.c:612
__asan_report_load4_noabort+0x14/0x20 /mm/kasan/generic_report.c:131
tcp_probe_timer /net/ipv4/tcp_timer.c:360 [inline]
tcp_write_timer_handler+0x8c6/0x8d0 /net/ipv4/tcp_timer.c:596
tcp_write_timer+0xa8/0x1e0 /net/ipv4/tcp_timer.c:612
call_timer_fn+0x1ac/0x780 /kernel/time/timer.c:1322
expire_timers /kernel/time/timer.c:1366 [inline]
__run_timers /kernel/time/timer.c:1685 [inline]
__run_timers /kernel/time/timer.c:1653 [inline]
run_timer_softirq+0x697/0x17a0 /kernel/time/timer.c:1698
__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:537 [inline]
smp_apic_timer_interrupt+0x1a3/0x610 /arch/x86/kernel/apic/apic.c:1095
apic_timer_interrupt+0xf/0x20 /arch/x86/entry/entry_64.S:828
RIP: 0010:rcu_is_watching+0xb/0x30 /kernel/rcu/tree.c:894
Code: 4c 89 e7 e8 57 10 4c 00 eb df 48 89 45 e8 e8 6c 10 4c 00 48 8b 45 e8 eb 8e 66 0f 1f 44 00 00 55 48 89 e5 65 ff 05 7d dc a1 7e 40 ff ff ff 83 f0 01 65 ff 0d 6e dc a1 7e 74 02 5d c3 e8 ce 45
RSP: 0018:ffff88808916f680 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000001 RBX: ffffea0002472b40 RCX: 1ffffffff134592e
RDX: ffffffff81b0a410 RSI: 0000000000000008 RDI: ffff88805b032c8c
RBP: ffff88808916f680 R08: 1ffffffff14a2758 R09: fffffbfff14a2759
R10: ffff88805b032cb8 R11: ffff88805b032400 R12: ffffea0002472b40
R13: 0000000000000000 R14: ffffea0002472b48 R15: dead000000000100
rcu_read_lock /./include/linux/rcupdate.h:593 [inline]
lock_page_memcg+0x13d/0x240 /mm/memcontrol.c:2041
page_remove_file_rmap /mm/rmap.c:1218 [inline]
page_remove_rmap+0x5d6/0x1190 /mm/rmap.c:1303
zap_pte_range /mm/memory.c:1093 [inline]
zap_pmd_range /mm/memory.c:1195 [inline]
zap_pud_range /mm/memory.c:1224 [inline]
zap_p4d_range /mm/memory.c:1245 [inline]
unmap_page_range+0xd4a/0x2170 /mm/memory.c:1266
unmap_single_vma+0x19d/0x300 /mm/memory.c:1311
unmap_vmas+0x135/0x280 /mm/memory.c:1343
exit_mmap+0x2ba/0x530 /mm/mmap.c:3145
__mmput /kernel/fork.c:1065 [inline]
mmput+0x179/0x4d0 /kernel/fork.c:1086
exit_mm /kernel/exit.c:547 [inline]
do_exit+0x823/0x2eb0 /kernel/exit.c:864
do_group_exit+0x135/0x370 /kernel/exit.c:981
get_signal+0x48a/0x2510 /kernel/signal.c:2728
do_signal+0x87/0x1670 /arch/x86/kernel/signal.c:815
exit_to_usermode_loop+0x286/0x380 /arch/x86/entry/common.c:159
prepare_exit_to_usermode /arch/x86/entry/common.c:194 [inline]
syscall_return_slowpath /arch/x86/entry/common.c:274 [inline]
do_syscall_64+0x5a9/0x6a0 /arch/x86/entry/common.c:299
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x459819
Code: Bad RIP value.
RSP: 002b:00007f2d3abe7cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 000000000075c078 RCX: 0000000000459819
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000075c078
RBP: 000000000075c070 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000075c07c
R13: 00007ffe82fac86f R14: 00007f2d3abe89c0 R15: 000000000075c07c
Allocated by task 21038:
save_stack+0x23/0x90 /mm/kasan/common.c:69
set_track /mm/kasan/common.c:77 [inline]
__kasan_kmalloc /mm/kasan/common.c:487 [inline]
__kasan_kmalloc.constprop.0+0xcf/0xe0 /mm/kasan/common.c:460
kasan_slab_alloc+0xf/0x20 /mm/kasan/common.c:495
slab_post_alloc_hook /mm/slab.h:520 [inline]
slab_alloc /mm/slab.c:3319 [inline]
kmem_cache_alloc+0x121/0x710 /mm/slab.c:3483
kmem_cache_zalloc /./include/linux/slab.h:738 [inline]
net_alloc /net/core/net_namespace.c:410 [inline]
copy_net_ns+0xf1/0x420 /net/core/net_namespace.c:462
create_new_namespaces+0x400/0x7b0 /kernel/nsproxy.c:103
unshare_nsproxy_namespaces+0xc2/0x200 /kernel/nsproxy.c:202
ksys_unshare+0x440/0x980 /kernel/fork.c:2819
__do_sys_unshare /kernel/fork.c:2887 [inline]
__se_sys_unshare /kernel/fork.c:2885 [inline]
__x64_sys_unshare+0x31/0x40 /kernel/fork.c:2885
do_syscall_64+0xfd/0x6a0 /arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 12820:
save_stack+0x23/0x90 /mm/kasan/common.c:69
set_track /mm/kasan/common.c:77 [inline]
__kasan_slab_free+0x102/0x150 /mm/kasan/common.c:449
kasan_slab_free+0xe/0x10 /mm/kasan/common.c:457
__cache_free /mm/slab.c:3425 [inline]
kmem_cache_free+0x86/0x320 /mm/slab.c:3693
net_free /net/core/net_namespace.c:438 [inline]
net_drop_ns.part.0+0x70/0x90 /net/core/net_namespace.c:445
net_drop_ns /net/core/net_namespace.c:444 [inline]
cleanup_net+0x77a/0xa70 /net/core/net_namespace.c:613
process_one_work+0x9af/0x1740 /kernel/workqueue.c:2269
worker_thread+0x98/0xe40 /kernel/workqueue.c:2415
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 ffff88806766c380
which belongs to the cache net_namespace of size 6784
The buggy address is located 1488 bytes inside of
6784-byte region [ffff88806766c380, ffff88806766de00)
The buggy address belongs to the page:
page:ffffea00019d9b00 refcount:1 mapcount:0 mapping:ffff8880a99aae00 index:0x0 compound_mapcount: 0
flags: 0x1fffc0000010200(slab|head)
raw: 01fffc0000010200 ffffea0001bdd608 ffffea0001980208 ffff8880a99aae00
raw: 0000000000000000 ffff88806766c380 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88806766c800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88806766c880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88806766c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88806766c980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88806766ca00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================