KASAN: slab-out-of-bounds Read in tcp_retransmit_timer

6 views
Skip to first unread message

syzbot

unread,
Dec 9, 2021, 5:25:28 AM12/9/21
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=151a6de5b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=00223a162cd96b9905e3
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+00223a...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: slab-out-of-bounds in tcp_retransmit_timer+0x2fc3/0x33f0 net/ipv4/tcp_timer.c:480
Read of size 8 at addr ffff8880499bc4f8 by task swapper/1/0

CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
kasan_report mm/kasan/report.c:412 [inline]
__asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433
tcp_retransmit_timer+0x2fc3/0x33f0 net/ipv4/tcp_timer.c:480
tcp_write_timer_handler+0x5e6/0xa60 net/ipv4/tcp_timer.c:593
tcp_write_timer+0x103/0x1b0 net/ipv4/tcp_timer.c:613
call_timer_fn+0x177/0x700 kernel/time/timer.c:1338
expire_timers+0x243/0x4e0 kernel/time/timer.c:1375
__run_timers kernel/time/timer.c:1696 [inline]
run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709
__do_softirq+0x265/0x980 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:372 [inline]
irq_exit+0x215/0x260 kernel/softirq.c:412
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894
</IRQ>
RIP: 0010:native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:61
Code: 48 89 df e8 f4 20 7f f9 e9 2e ff ff ff 48 89 df e8 e7 20 7f f9 eb 82 90 90 90 90 90 e9 07 00 00 00 0f 00 2d 14 43 4e 00 fb f4 <c3> 90 e9 07 00 00 00 0f 00 2d 04 43 4e 00 f4 c3 90 90 41 56 41 55
RSP: 0018:ffff8880b5a9fd40 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13
RAX: 1ffffffff13e3054 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff8880b5a86c44
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff89f18290
R13: 1ffff11016b53fb2 R14: 0000000000000000 R15: 0000000000000000
arch_safe_halt arch/x86/include/asm/paravirt.h:94 [inline]
default_idle+0x49/0x310 arch/x86/kernel/process.c:557
cpuidle_idle_call kernel/sched/idle.c:153 [inline]
do_idle+0x2ec/0x4b0 kernel/sched/idle.c:263
cpu_startup_entry+0xc5/0xe0 kernel/sched/idle.c:369
start_secondary+0x435/0x5c0 arch/x86/kernel/smpboot.c:271
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243

Allocated by task 1:
kmem_cache_alloc+0x122/0x370 mm/slab.c:3559
getname_flags+0xce/0x590 fs/namei.c:140
do_sys_open+0x26c/0x520 fs/open.c:1079
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 1:
__cache_free mm/slab.c:3503 [inline]
kmem_cache_free+0x7f/0x260 mm/slab.c:3765
putname+0xe1/0x120 fs/namei.c:261
do_sys_open+0x2ba/0x520 fs/open.c:1094
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff8880499bc900
which belongs to the cache names_cache of size 4096
The buggy address is located 1032 bytes to the left of
4096-byte region [ffff8880499bc900, ffff8880499bd900)
The buggy address belongs to the page:
page:ffffea0001266f00 count:1 mapcount:0 mapping:ffff88823b843380 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea0001343488 ffffea0001266f88 ffff88823b843380
raw: 0000000000000000 ffff8880499bc900 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff8880499bc380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880499bc400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880499bc480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff8880499bc500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880499bc580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 48 89 df mov %rbx,%rdi
3: e8 f4 20 7f f9 callq 0xf97f20fc
8: e9 2e ff ff ff jmpq 0xffffff3b
d: 48 89 df mov %rbx,%rdi
10: e8 e7 20 7f f9 callq 0xf97f20fc
15: eb 82 jmp 0xffffff99
17: 90 nop
18: 90 nop
19: 90 nop
1a: 90 nop
1b: 90 nop
1c: e9 07 00 00 00 jmpq 0x28
21: 0f 00 2d 14 43 4e 00 verw 0x4e4314(%rip) # 0x4e433c
28: fb sti
29: f4 hlt
* 2a: c3 retq <-- trapping instruction
2b: 90 nop
2c: e9 07 00 00 00 jmpq 0x38
31: 0f 00 2d 04 43 4e 00 verw 0x4e4304(%rip) # 0x4e433c
38: f4 hlt
39: c3 retq
3a: 90 nop
3b: 90 nop
3c: 41 56 push %r14
3e: 41 55 push %r13


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Oct 4, 2022, 7:51:34 AM10/4/22
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages