================================================================== BUG: KASAN: slab-out-of-bounds in tcp_probe_timer net/ipv4/tcp_timer.c:365 [inline] BUG: KASAN: slab-out-of-bounds in tcp_write_timer_handler+0xab1/0xaf0 net/ipv4/tcp_timer.c:608 Read of size 4 at addr ffff88806fd3a7c4 by task kworker/u4:18/10446 CPU: 1 PID: 10446 Comm: kworker/u4:18 Not tainted 5.11.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2c6 mm/kasan/report.c:230 __kasan_report mm/kasan/report.c:396 [inline] kasan_report.cold+0x79/0xd5 mm/kasan/report.c:413 tcp_probe_timer net/ipv4/tcp_timer.c:365 [inline] tcp_write_timer_handler+0xab1/0xaf0 net/ipv4/tcp_timer.c:608 tcp_write_timer+0xa2/0x2b0 net/ipv4/tcp_timer.c:624 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1417 expire_timers kernel/time/timer.c:1462 [inline] __run_timers.part.0+0x67c/0xa50 kernel/time/timer.c:1731 __run_timers kernel/time/timer.c:1712 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1744 __do_softirq+0x2bc/0xa29 kernel/softirq.c:343 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+0xaa/0xd0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:226 [inline] __irq_exit_rcu kernel/softirq.c:420 [inline] irq_exit_rcu+0x134/0x200 kernel/softirq.c:432 sysvec_apic_timer_interrupt+0x4d/0x100 arch/x86/kernel/apic/apic.c:1096 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:628 RIP: 0010:lock_is_held_type+0xc2/0x100 kernel/locking/lockdep.c:5481 Code: 03 44 39 f0 41 0f 94 c4 48 c7 c7 80 ab 4b 89 e8 44 0b 00 00 b8 ff ff ff ff 65 0f c1 05 87 4e 07 77 83 f8 01 75 23 ff 34 24 9d <48> 83 c4 08 44 89 e0 5b 5d 41 5c 41 5d 41 5e 41 5f c3 45 31 e4 eb RSP: 0018:ffffc90002a97ad8 EFLAGS: 00000202 RAX: 0000000000000001 RBX: 0000000000000003 RCX: 1ffffffff1a07be3 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffffff8b373860 R08: 000000000000ffff R09: 0000000000000000 R10: ffffffff877408ed R11: 0000000000000000 R12: 0000000000000000 R13: ffff8880785a6c08 R14: 00000000ffffffff R15: ffff8880785a6c58 lock_is_held include/linux/lockdep.h:271 [inline] ___might_sleep+0x23f/0x2c0 kernel/sched/core.c:7867 inet_twsk_purge+0xe8/0x7c0 net/ipv4/inet_timewait_sock.c:267 ops_exit_list+0x10d/0x160 net/core/net_namespace.c:190 cleanup_net+0x4ea/0xb10 net/core/net_namespace.c:604 process_one_work+0x98d/0x15f0 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 Allocated by task 4888: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:401 [inline] ____kasan_kmalloc.constprop.0+0x7f/0xa0 mm/kasan/common.c:429 kasan_slab_alloc include/linux/kasan.h:209 [inline] slab_post_alloc_hook mm/slab.h:512 [inline] slab_alloc mm/slab.c:3315 [inline] kmem_cache_alloc+0x1ab/0x4c0 mm/slab.c:3486 getname_flags.part.0+0x50/0x4f0 fs/namei.c:138 getname_flags+0x9a/0xe0 include/linux/audit.h:319 getname fs/namei.c:209 [inline] user_path_create fs/namei.c:3527 [inline] do_mkdirat+0x8d/0x2d0 fs/namei.c:3667 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 4888: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:356 ____kasan_slab_free+0xb0/0xe0 mm/kasan/common.c:362 kasan_slab_free include/linux/kasan.h:192 [inline] __cache_free mm/slab.c:3424 [inline] kmem_cache_free+0x58/0x1c0 mm/slab.c:3697 putname+0xe1/0x120 fs/namei.c:259 filename_parentat+0x4b1/0x560 fs/namei.c:2420 filename_create+0x9e/0x490 fs/namei.c:3452 user_path_create fs/namei.c:3527 [inline] do_mkdirat+0xa0/0x2d0 fs/namei.c:3667 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 ffff88806fd3ad80 which belongs to the cache names_cache of size 4096 The buggy address is located 1468 bytes to the left of 4096-byte region [ffff88806fd3ad80, ffff88806fd3bd80) The buggy address belongs to the page: page:0000000003ff79f9 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6fd3a head:0000000003ff79f9 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 ffffea0001e7a188 ffffea0000449508 ffff888140056000 raw: 0000000000000000 ffff88806fd3ad80 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88806fd3a680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806fd3a700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88806fd3a780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88806fd3a800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806fd3a880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================