================================================================== BUG: KASAN: slab-out-of-bounds in tcp_probe_timer net/ipv4/tcp_timer.c:372 [inline] BUG: KASAN: slab-out-of-bounds in tcp_write_timer_handler+0x9d0/0xa60 net/ipv4/tcp_timer.c:615 Read of size 4 at addr ffff88809390e77c by task syz-executor.4/2124 CPU: 0 PID: 2124 Comm: syz-executor.4 Not tainted 5.8.0-syzkaller #0 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+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x436 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 tcp_probe_timer net/ipv4/tcp_timer.c:372 [inline] tcp_write_timer_handler+0x9d0/0xa60 net/ipv4/tcp_timer.c:615 tcp_write_timer+0xa2/0x2b0 net/ipv4/tcp_timer.c:631 call_timer_fn+0x1ac/0x760 kernel/time/timer.c:1413 expire_timers kernel/time/timer.c:1458 [inline] __run_timers.part.0+0x67c/0xaa0 kernel/time/timer.c:1755 __run_timers kernel/time/timer.c:1736 [inline] run_timer_softirq+0xae/0x1a0 kernel/time/timer.c:1768 __do_softirq+0x2de/0xa24 kernel/softirq.c:298 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:706 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline] do_softirq_own_stack+0x9d/0xd0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:393 [inline] __irq_exit_rcu kernel/softirq.c:423 [inline] irq_exit_rcu+0x1f3/0x230 kernel/softirq.c:435 sysvec_apic_timer_interrupt+0x51/0xf0 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:581 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:770 [inline] RIP: 0010:lock_acquire+0x27b/0xad0 kernel/locking/lockdep.c:5008 Code: 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 0f 85 f8 06 00 00 48 83 3d fa ba 5b 08 00 0f 84 a6 05 00 00 48 8b 7c 24 08 57 9d <0f> 1f 44 00 00 48 b8 00 00 00 00 00 fc ff df 48 03 44 24 10 48 c7 RSP: 0018:ffffc90005177b78 EFLAGS: 00000286 RAX: 1ffffffff136c689 RBX: ffff8880531ee080 RCX: ffffffff815a212b RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000286 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff8c5e3a37 R10: fffffbfff18bc746 R11: 0000000000000000 R12: 0000000000000000 R13: ffffffff89c83c60 R14: 0000000000000000 R15: ffff8880531ee080 __fs_reclaim_acquire mm/page_alloc.c:4183 [inline] fs_reclaim_acquire+0x2f/0x40 mm/page_alloc.c:4194 slab_pre_alloc_hook mm/slab.h:564 [inline] slab_alloc mm/slab.c:3306 [inline] kmem_cache_alloc+0x22/0x3b0 mm/slab.c:3484 kmem_cache_zalloc include/linux/slab.h:659 [inline] __alloc_file+0x21/0x350 fs/file_table.c:101 alloc_empty_file+0x6d/0x170 fs/file_table.c:151 alloc_file+0x5e/0x5a0 fs/file_table.c:193 alloc_file_pseudo+0x165/0x250 fs/file_table.c:233 sock_alloc_file+0x4f/0x190 net/socket.c:411 __sys_socketpair+0x32e/0x570 net/socket.c:1609 __do_sys_socketpair net/socket.c:1631 [inline] __se_sys_socketpair net/socket.c:1628 [inline] __x64_sys_socketpair+0x93/0xf0 net/socket.c:1628 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45ce79 Code: 2d b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f9d5bb2dc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000035 RAX: ffffffffffffffda RBX: 0000000000032b80 RCX: 000000000045ce79 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000001 RBP: 000000000118bf68 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000040 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffc73d3266f R14: 00007f9d5bb2e9c0 R15: 000000000118bf2c Allocated by task 3898: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:494 slab_post_alloc_hook mm/slab.h:586 [inline] slab_alloc mm/slab.c:3320 [inline] kmem_cache_alloc+0x12c/0x3b0 mm/slab.c:3484 getname_flags.part.0+0x50/0x4f0 fs/namei.c:138 getname_flags fs/namei.c:2646 [inline] user_path_at_empty+0xa1/0x100 fs/namei.c:2646 do_readlinkat+0xcd/0x2f0 fs/stat.c:419 __do_sys_readlinkat fs/stat.c:446 [inline] __se_sys_readlinkat fs/stat.c:443 [inline] __x64_sys_readlinkat+0x93/0xf0 fs/stat.c:443 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 3898: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0xf5/0x140 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x7f/0x310 mm/slab.c:3694 putname+0xe1/0x120 fs/namei.c:259 filename_lookup+0x3b1/0x560 fs/namei.c:2376 do_readlinkat+0xcd/0x2f0 fs/stat.c:419 __do_sys_readlinkat fs/stat.c:446 [inline] __se_sys_readlinkat fs/stat.c:443 [inline] __x64_sys_readlinkat+0x93/0xf0 fs/stat.c:443 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88809390ee80 which belongs to the cache names_cache of size 4096 The buggy address is located 1796 bytes to the left of 4096-byte region [ffff88809390ee80, ffff88809390fe80) The buggy address belongs to the page: page:ffffea00024e4380 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 head:ffffea00024e4380 order:1 compound_mapcount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea00012f9708 ffffea0002524c08 ffff88821bc51380 raw: 0000000000000000 ffff88809390ee80 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809390e600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809390e680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809390e700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88809390e780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809390e800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================