================================================================== BUG: KASAN: slab-out-of-bounds in tcp_retransmit_timer+0x2a66/0x2e80 net/ipv4/tcp_timer.c:500 Read of size 8 at addr ffff88806dfec310 by task syz-executor.4/14854 CPU: 1 PID: 14854 Comm: syz-executor.4 Not tainted 5.7.0-rc5-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x413 mm/kasan/report.c:382 __kasan_report.cold+0x20/0x38 mm/kasan/report.c:511 kasan_report+0x33/0x50 mm/kasan/common.c:625 tcp_retransmit_timer+0x2a66/0x2e80 net/ipv4/tcp_timer.c:500 tcp_write_timer_handler+0x686/0x8a0 net/ipv4/tcp_timer.c:611 tcp_write_timer+0xa2/0x2b0 net/ipv4/tcp_timer.c:631 call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x623/0x1600 kernel/time/timer.c:1786 __do_softirq+0x26c/0x9f7 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x192/0x1d0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:546 [inline] smp_apic_timer_interrupt+0x19e/0x600 arch/x86/kernel/apic/apic.c:1140 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:constant_test_bit arch/x86/include/asm/bitops.h:207 [inline] RIP: 0010:test_bit include/asm-generic/bitops/instrumented-non-atomic.h:111 [inline] RIP: 0010:PageLocked include/linux/page-flags.h:320 [inline] RIP: 0010:ext4_block_write_begin+0x222/0x1430 fs/ext4/inode.c:1028 Code: 0f 00 00 e8 b0 ef 71 ff be 08 00 00 00 4c 89 f7 e8 83 13 b0 ff 4c 89 f2 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 <0f> 85 b7 10 00 00 4d 8b 2e 31 ff 41 83 e5 01 44 89 ee e8 a7 f0 71 RSP: 0018:ffffc900017a7810 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff8201430d RDX: 1ffffd4000450d00 RSI: 0000000000000008 RDI: ffffea0002286800 RBP: ffffea0002286800 R08: ffff88805f540000 R09: fffff94000450d01 R10: ffffea0002286807 R11: fffff94000450d00 R12: 0000000000000000 R13: dead000000000100 R14: ffffea0002286800 R15: 0000000000000000 ext4_da_write_begin+0x56e/0xbc0 fs/ext4/inode.c:2995 generic_perform_write+0x20a/0x4e0 mm/filemap.c:3302 ext4_buffered_write_iter+0x1f7/0x450 fs/ext4/file.c:270 ext4_file_write_iter+0x1ec/0x13f0 fs/ext4/file.c:642 call_write_iter include/linux/fs.h:1907 [inline] new_sync_write+0x4a2/0x700 fs/read_write.c:484 __vfs_write+0xc9/0x100 fs/read_write.c:497 vfs_write+0x268/0x5d0 fs/read_write.c:559 ksys_write+0x12d/0x250 fs/read_write.c:612 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x45ca29 Code: 0d b7 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 b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007faf55b92c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000050ca00 RCX: 000000000045ca29 RDX: 0000000000400086 RSI: 0000000020000200 RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000cef R14: 00000000004cf3c7 R15: 00007faf55b936d4 Allocated by task 4121: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc mm/kasan/common.c:495 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:468 slab_post_alloc_hook mm/slab.h:586 [inline] slab_alloc mm/slab.c:3320 [inline] kmem_cache_alloc+0x11b/0x740 mm/slab.c:3484 getname_flags fs/namei.c:138 [inline] getname_flags+0xd2/0x5b0 fs/namei.c:128 user_path_at_empty+0x2a/0x50 fs/namei.c:2632 do_readlinkat+0xcd/0x300 fs/stat.c:409 __do_sys_readlinkat fs/stat.c:436 [inline] __se_sys_readlinkat fs/stat.c:433 [inline] __x64_sys_readlinkat+0x93/0xf0 fs/stat.c:433 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 4121: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x7f/0x320 mm/slab.c:3694 putname+0xe1/0x120 fs/namei.c:259 filename_lookup+0x282/0x3e0 fs/namei.c:2362 do_readlinkat+0xcd/0x300 fs/stat.c:409 __do_sys_readlinkat fs/stat.c:436 [inline] __se_sys_readlinkat fs/stat.c:433 [inline] __x64_sys_readlinkat+0x93/0xf0 fs/stat.c:433 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 The buggy address belongs to the object at ffff88806dfecec0 which belongs to the cache names_cache of size 4096 The buggy address is located 2992 bytes to the left of 4096-byte region [ffff88806dfecec0, ffff88806dfedec0) The buggy address belongs to the page: page:ffffea0001b7fb00 refcount:1 mapcount:0 mapping:00000000db491967 index:0x0 head:ffffea0001b7fb00 order:1 compound_mapcount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea00024cf788 ffffea00016e4e88 ffff8880aa1ec000 raw: 0000000000000000 ffff88806dfecec0 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88806dfec200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806dfec280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88806dfec300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88806dfec380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806dfec400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================