==================================================================
BUG: KASAN: use-after-free in tcp_retransmit_timer+0x2b80/0x2f20 net/ipv4/tcp_timer.c:480
Read of size 8 at addr ffff888067920538 by task syz-executor.0/31435
CPU: 0 PID: 31435 Comm: syz-executor.0 Not tainted 5.2.0-rc1+ #6
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:188
__kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317
kasan_report+0x12/0x20 mm/kasan/common.c:614
__asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132
tcp_retransmit_timer+0x2b80/0x2f20 net/ipv4/tcp_timer.c:480
tcp_write_timer_handler+0x591/0x8a0 net/ipv4/tcp_timer.c:591
tcp_write_timer+0x10e/0x1d0 net/ipv4/tcp_timer.c:611
call_timer_fn+0x193/0x720 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+0x66f/0x1740 kernel/time/timer.c:1698
__do_softirq+0x25c/0x94c kernel/softirq.c:293
invoke_softirq kernel/softirq.c:374 [inline]
irq_exit+0x180/0x1d0 kernel/softirq.c:414
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x13b/0x550 arch/x86/kernel/apic/apic.c:1068
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:806
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x54/0x90 kernel/locking/spinlock.c:199
Code: c0 80 70 b2 88 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 33 48 83 3d 15 bf 95 01 00 74 20 fb 66 0f 1f 44 00 00 01 00 00 00 e8 62 c9 30 fa 65 8b 05 03 4c e5 78 85 c0 74 06 41
RSP: 0018:ffff88808247fd80 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13
RAX: 1ffffffff1164e10 RBX: ffff888063b5e080 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000006 RDI: ffff888063b5e8fc
RBP: ffff88808247fd88 R08: ffff888063b5e080 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880ae835040
R13: ffff888069d705c0 R14: 0000000000000000 R15: 0000000000000001
finish_lock_switch kernel/sched/core.c:2568 [inline]
finish_task_switch+0x146/0x730 kernel/sched/core.c:2668
context_switch kernel/sched/core.c:2821 [inline]
__schedule+0x7d3/0x1560 kernel/sched/core.c:3445
schedule+0xa8/0x260 kernel/sched/core.c:3509
exit_to_usermode_loop+0x195/0x2c0 arch/x86/entry/common.c:154
prepare_exit_to_usermode+0x2e4/0x350 arch/x86/entry/common.c:199
retint_user+0x8/0x18
RIP: 0033:0x40e23b
Code: 39 ca 76 0f 0f 1f 00 48 83 e8 08 48 8b 10 48 39 ca 77 f4 48 39 e8 76 18 48 89 57 f8 4c 89 00 48 8b 50 f8 49 8b 0c 24 4c 8b 07 <48> 83 c7 08 eb bf 4c 89 ea 48 89 ef e8 34 ff ff ff 48 89 e8 4c 29
RSP: 002b:00007fff6da03e20 EFLAGS: 00000212 ORIG_RAX: ffffffffffffff13
RAX: 00007f62eaa16600 RBX: 00007f62ea9ba018 RCX: ffffffff815fdfa8
RDX: ffffffff815fdfa8 RSI: 00007f62eaa20678 RDI: 00007f62ea9bfa00
RBP: 00007f62ea9bf9f8 R08: ffffffff815fe016 R09: 000000004316cc70
R10: 00007fff6da03ff0 R11: 0000000000000000 R12: 00007f62ea9ba008
R13: 000000000000001e R14: 00007f62ea9bf9f8 R15: 000000000003ffff
Allocated by task 25122:
save_stack+0x23/0x90 mm/kasan/common.c:71
set_track mm/kasan/common.c:79 [inline]
__kasan_kmalloc mm/kasan/common.c:489 [inline]
__kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462
kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:497
slab_post_alloc_hook mm/slab.h:437 [inline]
slab_alloc mm/slab.c:3326 [inline]
kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3488
kmem_cache_zalloc include/linux/slab.h:732 [inline]
net_alloc net/core/net_namespace.c:386 [inline]
copy_net_ns+0xed/0x340 net/core/net_namespace.c:426
create_new_namespaces+0x400/0x7b0 kernel/nsproxy.c:107
unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:206
ksys_unshare+0x440/0x980 kernel/fork.c:2692
__do_sys_unshare kernel/fork.c:2760 [inline]
__se_sys_unshare kernel/fork.c:2758 [inline]
__x64_sys_unshare+0x31/0x40 kernel/fork.c:2758
do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 9780:
save_stack+0x23/0x90 mm/kasan/common.c:71
set_track mm/kasan/common.c:79 [inline]
__kasan_slab_free+0x102/0x150 mm/kasan/common.c:451
kasan_slab_free+0xe/0x10 mm/kasan/common.c:459
__cache_free mm/slab.c:3432 [inline]
kmem_cache_free+0x86/0x260 mm/slab.c:3698
net_free net/core/net_namespace.c:402 [inline]
net_drop_ns.part.0+0x70/0x90 net/core/net_namespace.c:409
net_drop_ns net/core/net_namespace.c:408 [inline]
cleanup_net+0x538/0x960 net/core/net_namespace.c:571
process_one_work+0x989/0x1790 kernel/workqueue.c:2269
worker_thread+0x98/0xe40 kernel/workqueue.c:2415
kthread+0x354/0x420 kernel/kthread.c:255
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352
The buggy address belongs to the object at ffff888067920300
which belongs to the cache net_namespace of size 8640
The buggy address is located 568 bytes inside of
8640-byte region [ffff888067920300, ffff8880679224c0)
The buggy address belongs to the page:
page:ffffea00019e4800 refcount:1 mapcount:0 mapping:ffff88821b6f60c0 index:0x0 compound_mapcount: 0
flags: 0x1fffc0000010200(slab|head)
raw: 01fffc0000010200 ffffea00025a7e08 ffffea0001833d08 ffff88821b6f60c0
raw: 0000000000000000 ffff888067920300 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff888067920400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888067920480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888067920500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888067920580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888067920600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================