================================================================== BUG: KASAN: slab-out-of-bounds in tcp_retransmit_timer+0x2d4c/0x3240 net/ipv4/tcp_timer.c:500 Read of size 8 at addr ffff88808ae40310 by task syz-executor.4/28774 CPU: 0 PID: 28774 Comm: syz-executor.4 Not tainted 5.9.0-rc8-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+0x198/0x1fd lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 tcp_retransmit_timer+0x2d4c/0x3240 net/ipv4/tcp_timer.c:500 tcp_write_timer_handler+0x79b/0xa60 net/ipv4/tcp_timer.c:611 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+0xb3/0x1d0 kernel/time/timer.c:1768 __do_softirq+0x1f8/0xb23 kernel/softirq.c:298 asm_call_irq_on_stack+0xf/0x20 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] do_softirq_own_stack+0x9b/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+0x235/0x280 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_save_flags arch/x86/include/asm/paravirt.h:765 [inline] RIP: 0010:arch_local_irq_save+0x29/0x90 arch/x86/include/asm/paravirt.h:787 Code: 00 48 c7 c0 e0 6b fc 89 41 54 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 4a 48 83 3d cb 4b a1 08 00 74 3c 9c 58 <0f> 1f 44 00 00 48 ba 00 00 00 00 00 fc ff df 49 89 c4 48 c7 c0 f0 RSP: 0018:ffffc90001a67240 EFLAGS: 00000286 RAX: 0000000000000286 RBX: 0000000000000000 RCX: ffffc90014b16000 RDX: dffffc0000000000 RSI: 00000000ffffffff RDI: ffff888042bde640 RBP: ffff88803f3f4380 R08: 0000000000000000 R09: ffffea000200f187 R10: 0000000000000000 R11: 0000000000000000 R12: ffff888042bde640 R13: ffff88803f3f4c68 R14: 000000000000000f R15: 0000000000000005 lock_is_held_type+0x3a/0xf0 kernel/locking/lockdep.c:5064 lock_is_held include/linux/lockdep.h:267 [inline] xa_entry include/linux/xarray.h:1180 [inline] xas_next_marked include/linux/xarray.h:1663 [inline] find_get_pages_range_tag+0x9bc/0xd40 mm/filemap.c:2074 pagevec_lookup_range_tag+0x3b/0x80 mm/swap.c:1122 mpage_prepare_extent_to_map+0x30d/0xe00 fs/ext4/inode.c:2558 ext4_writepages+0x903/0x3960 fs/ext4/inode.c:2735 do_writepages+0xec/0x290 mm/page-writeback.c:2352 __filemap_fdatawrite_range+0x2a1/0x380 mm/filemap.c:422 file_write_and_wait_range+0x169/0x200 mm/filemap.c:761 ext4_sync_file+0x459/0x1090 fs/ext4/fsync.c:151 vfs_fsync_range+0x13a/0x220 fs/sync.c:200 generic_write_sync include/linux/fs.h:2747 [inline] ext4_buffered_write_iter+0x34a/0x4a0 fs/ext4/file.c:276 ext4_file_write_iter+0x1f0/0x13f0 fs/ext4/file.c:660 call_write_iter include/linux/fs.h:1882 [inline] new_sync_write+0x422/0x650 fs/read_write.c:503 vfs_write+0x5ad/0x730 fs/read_write.c:586 ksys_write+0x12d/0x250 fs/read_write.c:639 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45de59 Code: 0d b4 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 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fc0e1fd8c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000003aa80 RCX: 000000000045de59 RDX: 000000000000fdef RSI: 0000000020000100 RDI: 0000000000000004 RBP: 000000000118c008 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bfd4 R13: 00007ffda82702ff R14: 00007fc0e1fd99c0 R15: 000000000118bfd4 Allocated by task 28499: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461 slab_post_alloc_hook mm/slab.h:518 [inline] slab_alloc mm/slab.c:3316 [inline] kmem_cache_alloc+0x13a/0x3f0 mm/slab.c:3486 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 user_path_at include/linux/namei.h:59 [inline] vfs_statx+0x14e/0x390 fs/stat.c:202 vfs_lstat include/linux/fs.h:3178 [inline] __do_sys_newlstat+0x91/0x110 fs/stat.c:374 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 28499: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0xd8/0x120 mm/kasan/common.c:422 __cache_free mm/slab.c:3422 [inline] kmem_cache_free.part.0+0x74/0x1e0 mm/slab.c:3697 putname+0xe1/0x120 fs/namei.c:259 filename_lookup+0x3b1/0x560 fs/namei.c:2376 user_path_at include/linux/namei.h:59 [inline] vfs_statx+0x14e/0x390 fs/stat.c:202 vfs_lstat include/linux/fs.h:3178 [inline] __do_sys_newlstat+0x91/0x110 fs/stat.c:374 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 ffff88808ae40a40 which belongs to the cache names_cache of size 4096 The buggy address is located 1840 bytes to the left of 4096-byte region [ffff88808ae40a40, ffff88808ae41a40) The buggy address belongs to the page: page:00000000f8046eaa refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x8ae40 head:00000000f8046eaa order:1 compound_mapcount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea0002778708 ffffea0001038708 ffff88821bc47a00 raw: 0000000000000000 ffff88808ae40a40 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808ae40200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808ae40280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808ae40300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808ae40380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808ae40400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================