audit: type=1804 audit(1547495329.303:118): pid=24858 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor3" name="/root/syzkaller-testdir282450980/syzkaller.NhUTOC/530/memory.events" dev="sda1" ino=16557 res=1 ================================================================== BUG: KASAN: use-after-free in tcp_orphan_retries net/ipv4/tcp_timer.c:141 [inline] BUG: KASAN: use-after-free in tcp_probe_timer net/ipv4/tcp_timer.c:374 [inline] BUG: KASAN: use-after-free in tcp_write_timer_handler+0x92a/0x960 net/ipv4/tcp_timer.c:604 Read of size 4 at addr ffff88806c16c8e8 by task kworker/0:5/15290 CPU: 0 PID: 15290 Comm: kworker/0:5 Not tainted 4.20.0+ #3 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events rht_deferred_worker Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1db/0x2d0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 tcp_orphan_retries net/ipv4/tcp_timer.c:141 [inline] tcp_probe_timer net/ipv4/tcp_timer.c:374 [inline] tcp_write_timer_handler+0x92a/0x960 net/ipv4/tcp_timer.c:604 tcp_write_timer+0x10e/0x1d0 net/ipv4/tcp_timer.c:620 call_timer_fn+0x254/0x900 kernel/time/timer.c:1325 expire_timers kernel/time/timer.c:1362 [inline] __run_timers+0x6fc/0xd50 kernel/time/timer.c:1681 run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1694 __do_softirq+0x30b/0xb11 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1b7/0x760 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 40 50 92 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 33 48 83 3d 55 80 9b 01 00 74 20 fb 66 0f 1f 44 00 00 01 00 00 00 e8 d2 2f 61 f9 65 8b 05 cb 1d 0b 78 85 c0 74 06 41 RSP: 0018:ffff8880662379d8 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff1324a08 RBX: dffffc0000000000 RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff88805983abfc RBP: ffff8880662379e0 R08: ffff88805983a380 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880ae62c600 R13: 1ffff1100cc46f71 R14: ffff888066237c88 R15: ffff8880a85c2e00 spin_unlock_irq include/linux/spinlock.h:379 [inline] process_one_work+0xbf1/0x1ce0 kernel/workqueue.c:2126 worker_thread+0x143/0x14a0 kernel/workqueue.c:2296 kthread+0x357/0x430 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Allocated by task 23738: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531 kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x700 mm/slab.c:3554 getname_flags fs/namei.c:140 [inline] getname_flags+0xd6/0x5b0 fs/namei.c:129 user_path_at_empty+0x2f/0x50 fs/namei.c:2608 user_path_at include/linux/namei.h:57 [inline] ksys_chdir+0xaf/0x220 fs/open.c:439 __do_sys_chdir fs/open.c:461 [inline] __se_sys_chdir fs/open.c:459 [inline] __x64_sys_chdir+0x31/0x40 fs/open.c:459 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 23738: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3760 putname+0xef/0x130 fs/namei.c:261 filename_lookup+0x359/0x530 fs/namei.c:2357 user_path_at_empty+0x43/0x50 fs/namei.c:2608 user_path_at include/linux/namei.h:57 [inline] ksys_chdir+0xaf/0x220 fs/open.c:439 __do_sys_chdir fs/open.c:461 [inline] __se_sys_chdir fs/open.c:459 [inline] __x64_sys_chdir+0x31/0x40 fs/open.c:459 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88806c16c2c0 which belongs to the cache names_cache of size 4096 The buggy address is located 1576 bytes inside of 4096-byte region [ffff88806c16c2c0, ffff88806c16d2c0) The buggy address belongs to the page: page:ffffea0001b05b00 count:1 mapcount:0 mapping:ffff88812c2bec40 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0001ac9308 ffffea0001b05b88 ffff88812c2bec40 raw: 0000000000000000 ffff88806c16c2c0 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88806c16c780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806c16c800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88806c16c880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88806c16c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806c16c980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================