==================================================================
BUG: KASAN: slab-out-of-bounds in tcp_probe_timer net/ipv4/tcp_timer.c:383 [inline]
BUG: KASAN: slab-out-of-bounds in tcp_write_timer_handler+0xb91/0xbc0 net/ipv4/tcp_timer.c:626
Read of size 1 at addr ffff888016f6c815 by task syz-executor.3/9813
CPU: 1 PID: 9813 Comm: syz-executor.3 Not tainted 5.18.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:88 [inline]
dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
print_address_description.constprop.0.cold+0xeb/0x467 mm/kasan/report.c:313
print_report mm/kasan/report.c:429 [inline]
kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491
tcp_probe_timer net/ipv4/tcp_timer.c:383 [inline]
tcp_write_timer_handler+0xb91/0xbc0 net/ipv4/tcp_timer.c:626
tcp_write_timer+0xa2/0x2b0 net/ipv4/tcp_timer.c:642
call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421
expire_timers kernel/time/timer.c:1466 [inline]
__run_timers.part.0+0x679/0xa80 kernel/time/timer.c:1737
__run_timers kernel/time/timer.c:1715 [inline]
run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1750
__do_softirq+0x29b/0x9c2 kernel/softirq.c:558
invoke_softirq kernel/softirq.c:432 [inline]
__irq_exit_rcu+0x123/0x180 kernel/softirq.c:637
irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x38/0x70 kernel/locking/spinlock.c:194
Code: 74 24 10 e8 7a 4f f0 f7 48 89 ef e8 c2 ce f0 f7 81 e3 00 02 00 00 75 25 9c 58 f6 c4 02 75 2d 48 85 db 74 01 fb bf 01 00 00 00 53 ee e3 f7 65 8b 05 bc e3 95 76 85 c0 74 0a 5b 5d c3 e8 80 30
RSP: 0018:ffffc900043f7740 EFLAGS: 00000206
RAX: 0000000000000006 RBX: 0000000000000200 RCX: 1ffffffff2013646
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
RBP: ffff888074524ec0 R08: 0000000000000001 R09: ffffffff900599af
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000010 R14: 0000000000000001 R15: 0000000000000246
spin_unlock_irqrestore include/linux/spinlock.h:404 [inline]
__wake_up_common_lock+0xde/0x130 kernel/sched/wait.c:139
__unix_dgram_recvmsg+0x2cd/0xb80 net/unix/af_unix.c:2418
unix_dgram_recvmsg+0xca/0xf0 net/unix/af_unix.c:2489
sock_recvmsg_nosec net/socket.c:948 [inline]
____sys_recvmsg+0x521/0x5f0 net/socket.c:2630
___sys_recvmsg+0x127/0x200 net/socket.c:2674
do_recvmmsg+0x24d/0x6d0 net/socket.c:2768
__sys_recvmmsg net/socket.c:2847 [inline]
__do_sys_recvmmsg net/socket.c:2870 [inline]
__se_sys_recvmmsg net/socket.c:2863 [inline]
__x64_sys_recvmmsg+0x20b/0x260 net/socket.c:2863
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fcaa00890e9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fcaa1231168 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007fcaa019c030 RCX: 00007fcaa00890e9
RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 00007fcaa00e308d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd387fd8ff R14: 00007fcaa1231300 R15: 0000000000022000
Allocated by task 2964:
kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38
kasan_set_track mm/kasan/common.c:45 [inline]
set_alloc_info mm/kasan/common.c:436 [inline]
__kasan_slab_alloc+0x85/0xb0 mm/kasan/common.c:469
kasan_slab_alloc include/linux/kasan.h:224 [inline]
slab_post_alloc_hook mm/slab.h:749 [inline]
slab_alloc mm/slab.c:3316 [inline]
__kmem_cache_alloc_lru mm/slab.c:3493 [inline]
kmem_cache_alloc+0x265/0x560 mm/slab.c:3513
getname_flags.part.0+0x50/0x4f0 fs/namei.c:138
getname_flags+0x9a/0xe0 include/linux/audit.h:323
vfs_fstatat+0x73/0xb0 fs/stat.c:254
__do_sys_newfstatat+0x91/0x110 fs/stat.c:425
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
Freed by task 2964:
kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38
kasan_set_track+0x21/0x30 mm/kasan/common.c:45
kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370
____kasan_slab_free mm/kasan/common.c:366 [inline]
____kasan_slab_free+0x13d/0x180 mm/kasan/common.c:328
kasan_slab_free include/linux/kasan.h:200 [inline]
__cache_free mm/slab.c:3439 [inline]
kmem_cache_free.part.0+0xa9/0x240 mm/slab.c:3749
putname fs/namei.c:270 [inline]
putname+0xfe/0x140 fs/namei.c:256
vfs_fstatat+0x97/0xb0 fs/stat.c:256
__do_sys_newfstatat+0x91/0x110 fs/stat.c:425
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
The buggy address belongs to the object at ffff888016f6c840
which belongs to the cache names_cache of size 4096
The buggy address is located 43 bytes to the left of
4096-byte region [ffff888016f6c840, ffff888016f6d840)
The buggy address belongs to the physical page:
page:ffffea00005bdb00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x16f6c
head:ffffea00005bdb00 order:1 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea000143dc08 ffffea0001d2b488 ffff8881400a3000
raw: 0000000000000000 ffff888016f6c840 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0x3420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 2964, tgid 2964 (udevd), ts 294675130339, free_ts 294668295284
prep_new_page mm/page_alloc.c:2441 [inline]
get_page_from_freelist+0xba2/0x3e00 mm/page_alloc.c:4182
__alloc_pages+0x1b2/0x500 mm/page_alloc.c:5408
__alloc_pages_node include/linux/gfp.h:587 [inline]
kmem_getpages mm/slab.c:1378 [inline]
cache_grow_begin+0x75/0x350 mm/slab.c:2584
cache_alloc_refill+0x27f/0x380 mm/slab.c:2957
____cache_alloc mm/slab.c:3040 [inline]
____cache_alloc mm/slab.c:3023 [inline]
__do_cache_alloc mm/slab.c:3267 [inline]
slab_alloc mm/slab.c:3309 [inline]
__kmem_cache_alloc_lru mm/slab.c:3493 [inline]
kmem_cache_alloc+0x450/0x560 mm/slab.c:3513
getname_flags.part.0+0x50/0x4f0 fs/namei.c:138
getname_flags+0x9a/0xe0 include/linux/audit.h:323
vfs_fstatat+0x73/0xb0 fs/stat.c:254
__do_sys_newfstatat+0x91/0x110 fs/stat.c:425
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1356 [inline]
free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1406
free_unref_page_prepare mm/page_alloc.c:3328 [inline]
free_unref_page+0x19/0x6a0 mm/page_alloc.c:3423
slab_destroy mm/slab.c:1630 [inline]
slabs_destroy+0x89/0xc0 mm/slab.c:1650
cache_flusharray mm/slab.c:3411 [inline]
___cache_free+0x34e/0x670 mm/slab.c:3474
qlink_free mm/kasan/quarantine.c:157 [inline]
qlist_free_all+0x4f/0x1b0 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x97/0xb0 mm/kasan/common.c:446
kasan_slab_alloc include/linux/kasan.h:224 [inline]
slab_post_alloc_hook mm/slab.h:749 [inline]
slab_alloc mm/slab.c:3316 [inline]
__kmem_cache_alloc_lru mm/slab.c:3493 [inline]
kmem_cache_alloc+0x265/0x560 mm/slab.c:3513
getname_flags.part.0+0x50/0x4f0 fs/namei.c:138
getname_flags+0x9a/0xe0 include/linux/audit.h:323
user_path_at_empty+0x2b/0x60 fs/namei.c:2850
do_readlinkat+0xcd/0x2f0 fs/stat.c:456
__do_sys_readlink fs/stat.c:489 [inline]
__se_sys_readlink fs/stat.c:486 [inline]
__x64_sys_readlink+0x74/0xb0 fs/stat.c:486
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
Memory state around the buggy address:
ffff888016f6c700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888016f6c780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888016f6c800: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
^
ffff888016f6c880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888016f6c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 74 24 je 0x26
2: 10 e8 adc %ch,%al
4: 7a 4f jp 0x55
6: f0 f7 48 89 ef e8 c2 lock testl $0xcec2e8ef,-0x77(%rax)
d: ce
e: f0 f7 81 e3 00 02 00 lock testl $0x9c257500,0x200e3(%rcx)
15: 00 75 25 9c
19: 58 pop %rax
1a: f6 c4 02 test $0x2,%ah
1d: 75 2d jne 0x4c
1f: 48 85 db test %rbx,%rbx
22: 74 01 je 0x25
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 53 ee e3 f7 callq 0xf7e3ee82 <-- trapping instruction
2f: 65 8b 05 bc e3 95 76 mov %gs:0x7695e3bc(%rip),%eax # 0x7695e3f2
36: 85 c0 test %eax,%eax
38: 74 0a je 0x44
3a: 5b pop %rbx
3b: 5d pop %rbp
3c: c3 retq
3d: e8 .byte 0xe8
3e: 80 .byte 0x80
3f: 30 .byte 0x30