================================================================== BUG: KASAN: use-after-free in tcp_orphan_retries net/ipv4/tcp_timer.c:127 [inline] BUG: KASAN: use-after-free in tcp_probe_timer net/ipv4/tcp_timer.c:362 [inline] BUG: KASAN: use-after-free in tcp_write_timer_handler+0x889/0x8a0 net/ipv4/tcp_timer.c:591 Read of size 4 at addr ffff888067278be8 by task syz-executor.4/16922 CPU: 1 PID: 16922 Comm: syz-executor.4 Not tainted 5.1.0-rc5+ #151 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 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 tcp_orphan_retries net/ipv4/tcp_timer.c:127 [inline] tcp_probe_timer net/ipv4/tcp_timer.c:362 [inline] tcp_write_timer_handler+0x889/0x8a0 net/ipv4/tcp_timer.c:591 tcp_write_timer+0x10e/0x1d0 net/ipv4/tcp_timer.c:607 call_timer_fn+0x190/0x720 kernel/time/timer.c:1325 expire_timers kernel/time/timer.c:1362 [inline] __run_timers kernel/time/timer.c:1681 [inline] __run_timers kernel/time/timer.c:1649 [inline] run_timer_softirq+0x652/0x1700 kernel/time/timer.c:1694 __do_softirq+0x266/0x95a 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+0x14a/0x570 arch/x86/kernel/apic/apic.c:1062 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807 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:192 Code: c0 c0 96 92 88 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 33 48 83 3d d5 a4 7c 01 00 74 20 fb 66 0f 1f 44 00 00 01 00 00 00 e8 f2 e6 37 fa 65 8b 05 8b fb eb 78 85 c0 74 06 41 RSP: 0018:ffff8880984b7b18 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff11252d8 RBX: ffff8880a838e180 RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 0000000000000006 RDI: ffff8880a838e9fc RBP: ffff8880984b7b20 R08: ffff8880a838e180 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880ae92cf40 R13: ffff8880912786c0 R14: 0000000000000000 R15: 0000000000000001 finish_lock_switch kernel/sched/core.c:2627 [inline] finish_task_switch+0x146/0x780 kernel/sched/core.c:2727 context_switch kernel/sched/core.c:2880 [inline] __schedule+0x81b/0x1cc0 kernel/sched/core.c:3518 schedule+0x92/0x180 kernel/sched/core.c:3562 freezable_schedule include/linux/freezer.h:172 [inline] do_nanosleep+0x201/0x6a0 kernel/time/hrtimer.c:1679 hrtimer_nanosleep+0x2a6/0x570 kernel/time/hrtimer.c:1733 __do_sys_nanosleep kernel/time/hrtimer.c:1767 [inline] __se_sys_nanosleep kernel/time/hrtimer.c:1754 [inline] __x64_sys_nanosleep+0x1a6/0x220 kernel/time/hrtimer.c:1754 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x486400 Code: 00 00 48 c7 c0 d4 ff ff ff 64 c7 00 16 00 00 00 31 c0 eb be 66 0f 1f 44 00 00 83 3d 51 03 5d 00 00 75 14 b8 23 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 b4 e0 f8 ff c3 48 83 ec 08 e8 ea 53 fd ff RSP: 002b:00007ffd371ed3a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000023 RAX: ffffffffffffffda RBX: 0000000000108ef8 RCX: 0000000000486400 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007ffd371ed3b0 RBP: 0000000000000f3d R08: 0000000000000001 R09: 0000000001e5f940 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000007 R13: 00007ffd371ed400 R14: 0000000000108ecb R15: 00007ffd371ed410 Allocated by task 18656: 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:3394 [inline] kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3556 getname_flags fs/namei.c:138 [inline] getname_flags+0xd6/0x5b0 fs/namei.c:128 getname+0x1a/0x20 fs/namei.c:209 do_sys_open+0x2c9/0x5d0 fs/open.c:1063 __do_sys_open fs/open.c:1087 [inline] __se_sys_open fs/open.c:1082 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1082 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 18656: 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:3500 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3766 putname+0xef/0x130 fs/namei.c:259 do_sys_open+0x318/0x5d0 fs/open.c:1078 __do_sys_open fs/open.c:1087 [inline] __se_sys_open fs/open.c:1082 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1082 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 ffff888067278840 which belongs to the cache names_cache of size 4096 The buggy address is located 936 bytes inside of 4096-byte region [ffff888067278840, ffff888067279840) The buggy address belongs to the page: page:ffffea00019c9e00 count:1 mapcount:0 mapping:ffff88812c2d8dc0 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea000225aa08 ffffea0002545808 ffff88812c2d8dc0 raw: 0000000000000000 ffff888067278840 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888067278a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888067278b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888067278b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888067278c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888067278c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================