================================================================== BUG: KASAN: slab-out-of-bounds in tcp_retransmit_timer+0x2d4c/0x3240 net/ipv4/tcp_timer.c:500 Read of size 8 at addr ffff88805ba0e410 by task syz-executor.2/7081 CPU: 0 PID: 7081 Comm: syz-executor.2 Not tainted 5.8.0-rc1-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_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:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers.part.0+0x54c/0xa20 kernel/time/timer.c:1773 __run_timers kernel/time/timer.c:1745 [inline] run_timer_softirq+0xae/0x1a0 kernel/time/timer.c:1786 __do_softirq+0x34c/0xa60 kernel/softirq.c:292 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:711 __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+0x111/0x170 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:387 [inline] __irq_exit_rcu kernel/softirq.c:417 [inline] irq_exit_rcu+0x229/0x270 kernel/softirq.c:429 sysvec_apic_timer_interrupt+0x12d/0x220 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:596 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:765 [inline] RIP: 0010:lock_acquire+0x270/0xad0 kernel/locking/lockdep.c:4962 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 1d 0c 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:ffffc90005027a90 EFLAGS: 00000282 RAX: 1ffffffff13696a8 RBX: ffff88806e4ea200 RCX: 0000000000000001 RDX: dffffc0000000000 RSI: 0000000000000008 RDI: 0000000000000282 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff8c589a57 R10: fffffbfff18b134a R11: 0000000000000000 R12: 0000000000000001 R13: ffff8880a678aee8 R14: 0000000000000000 R15: ffff88806e4ea200 __might_fault mm/memory.c:4807 [inline] __might_fault+0x152/0x1d0 mm/memory.c:4792 _copy_to_user+0x29/0x160 lib/usercopy.c:27 copy_to_user include/linux/uaccess.h:152 [inline] copy_entries_to_user net/ipv4/netfilter/ip_tables.c:836 [inline] get_entries net/ipv4/netfilter/ip_tables.c:1024 [inline] do_ipt_get_ctl+0x592/0x8e0 net/ipv4/netfilter/ip_tables.c:1700 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x72/0xd0 net/netfilter/nf_sockopt.c:122 ip_getsockopt net/ipv4/ip_sockglue.c:1749 [inline] ip_getsockopt+0x167/0x1c0 net/ipv4/ip_sockglue.c:1729 tcp_getsockopt+0x86/0xd0 net/ipv4/tcp.c:3893 __sys_getsockopt+0x14b/0x2e0 net/socket.c:2172 __do_sys_getsockopt net/socket.c:2187 [inline] __se_sys_getsockopt net/socket.c:2184 [inline] __x64_sys_getsockopt+0xba/0x150 net/socket.c:2184 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:359 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45f56a Code: Bad RIP value. RSP: 002b:00007ffdba7d7dc8 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007ffdba7d7df0 RCX: 000000000045f56a RDX: 0000000000000041 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 0000000000742e60 R08: 00007ffdba7d7dec R09: 0000000000004000 R10: 00007ffdba7d7ef0 R11: 0000000000000212 R12: 0000000000000003 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000741a20 Allocated by task 3878: 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 user_path_at include/linux/namei.h:59 [inline] vfs_statx+0x14e/0x390 fs/stat.c:202 vfs_lstat include/linux/fs.h:3303 [inline] __do_sys_newlstat+0x91/0x110 fs/stat.c:374 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:359 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 3878: 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 user_path_at include/linux/namei.h:59 [inline] vfs_statx+0x14e/0x390 fs/stat.c:202 vfs_lstat include/linux/fs.h:3303 [inline] __do_sys_newlstat+0x91/0x110 fs/stat.c:374 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:359 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88805ba0ea00 which belongs to the cache names_cache of size 4096 The buggy address is located 1520 bytes to the left of 4096-byte region [ffff88805ba0ea00, ffff88805ba0fa00) The buggy address belongs to the page: page:ffffea00016e8380 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 head:ffffea00016e8380 order:1 compound_mapcount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea0001768888 ffffea000178c408 ffff8880aa1d0000 raw: 0000000000000000 ffff88805ba0ea00 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88805ba0e300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805ba0e380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805ba0e400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88805ba0e480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805ba0e500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================