================================================================== 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 ffff888087480690 by task ps/25206 CPU: 1 PID: 25206 Comm: ps Not tainted 5.2.0+ #97 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/0x17 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:format_decode+0x6ed/0xbc0 lib/vsprintf.c:2320 Code: 3d fa 41 80 4c 24 04 01 e9 4d fd ff ff e8 bb bd 3d fa 4d 89 fd 41 c6 04 24 03 49 83 c5 01 44 2b ad 70 ff ff ff e9 6d fb ff ff 9e bd 3d fa 4d 89 fd 41 c6 04 24 04 49 83 c5 01 44 2b ad 70 ff RSP: 0018:ffff8880933ef398 EFLAGS: 00000283 ORIG_RAX: ffffffffffffff13 RAX: 000000000000001b RBX: 0000000000000000 RCX: ffffffff8734c442 RDX: 0000000000000073 RSI: 0000000000000078 RDI: 0000000000000001 RBP: ffff8880933ef448 R08: ffff8880912d8480 R09: ffffed101267deb3 R10: ffffed101267deb2 R11: 0000000000000000 R12: ffff8880933ef4c8 R13: 0000000000000073 R14: ffff8880933ef420 R15: ffffffff87bf9946 vsnprintf+0x17e/0x19a0 lib/vsprintf.c:2455 tomoyo_supervisor+0x10f/0xef0 security/tomoyo/common.c:2067 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission security/tomoyo/file.c:587 [inline] tomoyo_path_permission+0x263/0x360 security/tomoyo/file.c:573 tomoyo_check_open_permission+0x3ab/0x3f0 security/tomoyo/file.c:777 tomoyo_file_open security/tomoyo/tomoyo.c:319 [inline] tomoyo_file_open+0xa9/0xd0 security/tomoyo/tomoyo.c:314 security_file_open+0x71/0x300 security/security.c:1457 do_dentry_open+0x373/0x1250 fs/open.c:765 vfs_open+0xa0/0xd0 fs/open.c:887 do_last fs/namei.c:3416 [inline] path_openat+0x10e9/0x4630 fs/namei.c:3533 do_filp_open+0x1a1/0x280 fs/namei.c:3563 do_sys_open+0x3fe/0x5d0 fs/open.c:1070 __do_sys_open fs/open.c:1088 [inline] __se_sys_open fs/open.c:1083 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1083 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f0ff79a3120 Code: 48 8b 15 1b 4d 2b 00 f7 d8 64 89 02 83 c8 ff c3 90 90 90 90 90 90 90 90 90 90 83 3d d5 a4 2b 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 5e 8c 01 00 48 89 04 24 RSP: 002b:00007ffc564d8eb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 0000000000616760 RCX: 00007f0ff79a3120 RDX: 00007ffc564d8ef2 RSI: 0000000000000000 RDI: 00007ffc564d8ee0 RBP: 0000000000020000 R08: 0000000000000000 R09: 00007f0ff7c6b55f R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000cc7220 R13: 0000000000000020 R14: 00007f0ff8058010 R15: 0000000000000000 Allocated by task 25206: 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 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:1064 __do_sys_open fs/open.c:1088 [inline] __se_sys_open fs/open.c:1083 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1083 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 25206: 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 putname+0xef/0x130 fs/namei.c:259 do_sys_open+0x318/0x5d0 fs/open.c:1079 __do_sys_open fs/open.c:1088 [inline] __se_sys_open fs/open.c:1083 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1083 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888087480480 which belongs to the cache names_cache of size 4096 The buggy address is located 528 bytes inside of 4096-byte region [ffff888087480480, ffff888087481480) The buggy address belongs to the page: page:ffffea00021d2000 refcount:1 mapcount:0 mapping:ffff88821bc46380 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002a04e88 ffffea000255ee88 ffff88821bc46380 raw: 0000000000000000 ffff888087480480 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888087480580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888087480600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888087480680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888087480700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888087480780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================