syzbot


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

Status: auto-closed as invalid on 2021/09/06 04:07
Reported-by: syzbot+5d9c74c22a58196140a8@syzkaller.appspotmail.com
First crash: 1367d, last: 1292d
Similar bugs (14)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in tcp_retransmit_timer (5) net C unreliable 16000 720d 1732d 22/28 fixed on 2023/02/24 13:50
linux-4.19 KASAN: use-after-free Read in tcp_retransmit_timer (2) 6 1221d 1388d 0/1 auto-closed as invalid on 2021/11/16 03:14
upstream KASAN: slab-out-of-bounds Read in tcp_retransmit_timer net 90 1492d 1733d 0/28 auto-closed as invalid on 2021/01/18 22:17
linux-4.19 KASAN: slab-out-of-bounds Read in tcp_retransmit_timer 9 899d 1078d 0/1 auto-obsoleted due to no activity on 2022/10/04 11:51
linux-4.19 KASAN: use-after-free Read in tcp_retransmit_timer (3) 1 753d 753d 0/1 auto-obsoleted due to no activity on 2023/02/27 17:38
linux-6.1 KASAN: use-after-free Read in tcp_retransmit_timer 14 235d 254d 0/3 auto-obsoleted due to no activity on 2024/06/08 21:34
linux-5.15 KASAN: use-after-free Read in tcp_retransmit_timer (2) 13 209d 395d 0/3 auto-obsoleted due to no activity on 2024/08/04 05:25
linux-6.1 KASAN: use-after-free Read in tcp_retransmit_timer (2) 1 145d 145d 0/3 auto-obsoleted due to no activity on 2024/10/06 20:00
linux-5.15 KASAN: use-after-free Read in tcp_retransmit_timer 76 504d 612d 0/3 auto-obsoleted due to no activity on 2023/09/14 02:10
linux-4.19 KASAN: use-after-free Read in tcp_retransmit_timer 2 1791d 1792d 0/1 auto-closed as invalid on 2020/04/25 09:53
upstream KASAN: use-after-free Read in tcp_retransmit_timer (2) net 1 2076d 2076d 0/28 closed as invalid on 2019/04/19 21:45
upstream KASAN: use-after-free Read in tcp_retransmit_timer (3) net 5 1988d 2007d 0/28 closed as invalid on 2019/07/01 18:06
upstream KASAN: use-after-free Read in tcp_retransmit_timer net 4 2119d 2232d 0/28 closed as invalid on 2019/03/10 18:51
upstream KASAN: use-after-free Read in tcp_retransmit_timer (4) net 2 1932d 1933d 0/28 closed as invalid on 2019/10/03 04:18

Sample crash report:
audit: type=1804 audit(1614046099.943:396): pid=30514 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir719148418/syzkaller.DYs7wp/1119/file0/bus" dev="loop5" ino=67 res=1
FAT-fs (loop5): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1)
==================================================================
BUG: KASAN: slab-out-of-bounds in tcp_retransmit_timer+0x245f/0x28c0 net/ipv4/tcp_timer.c:471
Read of size 8 at addr ffff8880a03c8378 by task swapper/1/0

CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.14.221-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:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
 tcp_retransmit_timer+0x245f/0x28c0 net/ipv4/tcp_timer.c:471
 tcp_write_timer_handler+0x434/0x780 net/ipv4/tcp_timer.c:583
 tcp_write_timer+0xc8/0x160 net/ipv4/tcp_timer.c:601
 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1280
 expire_timers+0x232/0x4d0 kernel/time/timer.c:1319
 __run_timers kernel/time/timer.c:1637 [inline]
 run_timer_softirq+0x1d5/0x5a0 kernel/time/timer.c:1650
 __do_softirq+0x24d/0x9ff kernel/softirq.c:288
 invoke_softirq kernel/softirq.c:368 [inline]
 irq_exit+0x193/0x240 kernel/softirq.c:409
 exiting_irq arch/x86/include/asm/apic.h:638 [inline]
 smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1106
 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:793
 </IRQ>
RIP: 0010:native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:61
RSP: 0018:ffff8880b5477e68 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff10
RAX: 1ffffffff11e1254 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff8880b5468bc4
RBP: ffffffff88f09290 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffed1016a8d068
R13: ffff8880b5468340 R14: 0000000000000000 R15: 0000000000000000
 arch_safe_halt arch/x86/include/asm/paravirt.h:94 [inline]
 default_idle+0x47/0x370 arch/x86/kernel/process.c:558
 cpuidle_idle_call kernel/sched/idle.c:156 [inline]
 do_idle+0x250/0x3c0 kernel/sched/idle.c:246
 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:351
 start_secondary+0x4db/0x670 arch/x86/kernel/smpboot.c:272
 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:240

Allocated by task 4629:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 kmem_cache_alloc+0x124/0x3c0 mm/slab.c:3552
 getname_flags+0xc8/0x550 fs/namei.c:138
 user_path_at_empty+0x2a/0x50 fs/namei.c:2631
 user_path_at include/linux/namei.h:57 [inline]
 vfs_statx+0xd1/0x180 fs/stat.c:185
 vfs_lstat include/linux/fs.h:3070 [inline]
 SYSC_newlstat fs/stat.c:350 [inline]
 SyS_newlstat+0x83/0xe0 fs/stat.c:344
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

Freed by task 4629:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758
 putname+0xcd/0x110 fs/namei.c:259
 filename_lookup+0x37b/0x510 fs/namei.c:2386
 user_path_at include/linux/namei.h:57 [inline]
 vfs_statx+0xd1/0x180 fs/stat.c:185
 vfs_lstat include/linux/fs.h:3070 [inline]
 SYSC_newlstat fs/stat.c:350 [inline]
 SyS_newlstat+0x83/0xe0 fs/stat.c:344
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

The buggy address belongs to the object at ffff8880a03c86c0
 which belongs to the cache names_cache of size 4096
The buggy address is located 840 bytes to the left of
 4096-byte region [ffff8880a03c86c0, ffff8880a03c96c0)
The buggy address belongs to the page:
page:ffffea000280f200 count:1 mapcount:0 mapping:ffff8880a03c86c0 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff8880a03c86c0 0000000000000000 0000000100000001
raw: ffffea0002593fa0 ffffea000280f2a0 ffff88823f8bb200 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880a03c8200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880a03c8280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880a03c8300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                                ^
 ffff8880a03c8380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880a03c8400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/02/23 02:08 linux-4.14.y 29c52025152b fcc6d71b .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in tcp_retransmit_timer
2021/05/09 04:07 linux-4.14.y 7d7d1c0ab3eb bc5434be .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tcp_retransmit_timer
2021/05/06 09:44 linux-4.14.y 7d7d1c0ab3eb 06c27ff5 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tcp_retransmit_timer
2021/04/02 23:36 linux-4.14.y bd634aa64163 6a81331a .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tcp_retransmit_timer
2021/02/28 18:53 linux-4.14.y 3242aa3a635c 4c37c133 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in tcp_retransmit_timer
* Struck through repros no longer work on HEAD.