syzbot


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

Status: auto-closed as invalid on 2021/01/18 22:17
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 857d, last: 617d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: slab-out-of-bounds Read in tcp_retransmit_timer 5 416d 491d 0/1 auto-closed as invalid on 2021/09/06 04:07
upstream KASAN: use-after-free Read in tcp_retransmit_timer (5) C unreliable 15981 1d00h 856d 21/22 upstream: reported C repro on 2020/02/24 07:40
linux-4.19 KASAN: use-after-free Read in tcp_retransmit_timer (2) 6 345d 512d 0/1 auto-closed as invalid on 2021/11/16 03:14
linux-4.19 KASAN: slab-out-of-bounds Read in tcp_retransmit_timer 9 23d 202d 0/1 upstream: reported on 2021/12/09 10:25

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in tcp_retransmit_timer+0x6e9/0x1cb0 net/ipv4/tcp_timer.c:500
Read of size 8 at addr ffff888094a5a350 by task syz-executor.3/11021

CPU: 1 PID: 11021 Comm: syz-executor.3 Not tainted 5.9.0-rc8-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+0x1d6/0x29e lib/dump_stack.c:118
 print_address_description+0x66/0x620 mm/kasan/report.c:383
 __kasan_report mm/kasan/report.c:513 [inline]
 kasan_report+0x132/0x1d0 mm/kasan/report.c:530
 tcp_retransmit_timer+0x6e9/0x1cb0 net/ipv4/tcp_timer.c:500
 tcp_write_timer_handler+0x1dc/0x8c0 net/ipv4/tcp_timer.c:611
 tcp_write_timer+0x168/0x280 net/ipv4/tcp_timer.c:631
 call_timer_fn+0x91/0x160 kernel/time/timer.c:1413
 expire_timers kernel/time/timer.c:1458 [inline]
 __run_timers+0x65e/0x830 kernel/time/timer.c:1755
 run_timer_softirq+0x46/0x80 kernel/time/timer.c:1768
 __do_softirq+0x256/0x6d5 kernel/softirq.c:298
 asm_call_irq_on_stack+0xf/0x20
 </IRQ>
 __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+0x8f/0xe0 arch/x86/kernel/irq_64.c:77
 do_softirq+0x102/0x150 kernel/softirq.c:343
 __local_bh_enable_ip+0x17f/0x1c0 kernel/softirq.c:195
 get_next_corpse net/netfilter/nf_conntrack_core.c:2226 [inline]
 nf_ct_iterate_cleanup+0x307/0x390 net/netfilter/nf_conntrack_core.c:2249
 nf_ct_iterate_cleanup_net+0xfc/0x150 net/netfilter/nf_conntrack_core.c:2334
 masq_device_event+0x9b/0xd0 net/netfilter/nf_nat_masquerade.c:88
 notifier_call_chain kernel/notifier.c:83 [inline]
 __raw_notifier_call_chain kernel/notifier.c:361 [inline]
 raw_notifier_call_chain+0xe7/0x170 kernel/notifier.c:368
 __dev_notify_flags+0x253/0x4d0 net/core/dev.c:2033
 dev_change_flags+0xe3/0x190 net/core/dev.c:8424
 dev_ifsioc+0xc7/0xac0 net/core/dev_ioctl.c:265
 dev_ioctl+0x4d1/0xc70 net/core/dev_ioctl.c:511
 sock_do_ioctl+0x169/0x260 net/socket.c:1070
 sock_ioctl+0x4aa/0x690 net/socket.c:1198
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:739
 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45de29
Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f53c161bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000000133c0 RCX: 000000000045de29
RDX: 0000000020000340 RSI: 0000000000008914 RDI: 0000000000000005
RBP: 000000000118c008 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bfd4
R13: 00007ffc2528cc3f R14: 00007f53c161c9c0 R15: 000000000118bfd4

Allocated by task 10941:
 kasan_save_stack mm/kasan/common.c:48 [inline]
 kasan_set_track mm/kasan/common.c:56 [inline]
 __kasan_kmalloc+0x100/0x130 mm/kasan/common.c:461
 slab_post_alloc_hook+0x3e/0x290 mm/slab.h:518
 slab_alloc mm/slab.c:3316 [inline]
 kmem_cache_alloc+0x1c1/0x2d0 mm/slab.c:3486
 getname_flags+0xb8/0x610 fs/namei.c:138
 user_path_at_empty+0x28/0x50 fs/namei.c:2646
 user_path_at include/linux/namei.h:59 [inline]
 vfs_statx+0xb9/0x380 fs/stat.c:202
 vfs_lstat include/linux/fs.h:3178 [inline]
 __do_sys_newlstat fs/stat.c:374 [inline]
 __se_sys_newlstat fs/stat.c:368 [inline]
 __x64_sys_newlstat+0x81/0xd0 fs/stat.c:368
 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Freed by task 10941:
 kasan_save_stack mm/kasan/common.c:48 [inline]
 kasan_set_track+0x3d/0x70 mm/kasan/common.c:56
 kasan_set_free_info+0x17/0x30 mm/kasan/generic.c:355
 __kasan_slab_free+0xdd/0x110 mm/kasan/common.c:422
 __cache_free mm/slab.c:3422 [inline]
 kmem_cache_free+0x82/0xf0 mm/slab.c:3697
 putname fs/namei.c:259 [inline]
 filename_lookup+0x410/0x5d0 fs/namei.c:2376
 user_path_at include/linux/namei.h:59 [inline]
 vfs_statx+0xb9/0x380 fs/stat.c:202
 vfs_lstat include/linux/fs.h:3178 [inline]
 __do_sys_newlstat fs/stat.c:374 [inline]
 __se_sys_newlstat fs/stat.c:368 [inline]
 __x64_sys_newlstat+0x81/0xd0 fs/stat.c:368
 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

The buggy address belongs to the object at ffff888094a5ae00
 which belongs to the cache names_cache of size 4096
The buggy address is located 2736 bytes to the left of
 4096-byte region [ffff888094a5ae00, ffff888094a5be00)
The buggy address belongs to the page:
page:00000000644f8c62 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x94a5a
head:00000000644f8c62 order:1 compound_mapcount:0
flags: 0xfffe0000010200(slab|head)
raw: 00fffe0000010200 ffffea0001556308 ffffea00011e0388 ffff8880aa624d00
raw: 0000000000000000 ffff888094a5ae00 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff888094a5a200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888094a5a280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888094a5a300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                 ^
 ffff888094a5a380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888094a5a400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (90):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2020/10/06 06:02 upstream 7575fdda569b 1880b4a9 .config log report info
ci-upstream-kasan-gce-root 2020/09/29 23:25 upstream ccc1d052eff9 5abc3f1a .config log report info
ci-upstream-bpf-kasan-gce 2020/10/19 18:34 bpf 9ff9b0d392ea ff4a3345 .config log report info
ci-upstream-bpf-kasan-gce 2020/10/16 15:14 bpf 28802e7c0c99 6e262c73 .config log report info
ci-upstream-bpf-kasan-gce 2020/10/15 13:48 bpf 28802e7c0c99 63869021 .config log report info
ci-upstream-bpf-kasan-gce 2020/10/13 00:54 bpf 28802e7c0c99 d32b0bbf .config log report info
ci-upstream-bpf-kasan-gce 2020/10/05 06:37 bpf d82a532a6115 5ef9c291 .config log report info
ci-upstream-bpf-kasan-gce 2020/09/26 17:51 bpf 87f92ac4c127 2d5ea0cb .config log report info
ci-upstream-bpf-kasan-gce 2020/09/12 05:01 bpf fde6dedfb794 79fb24e2 .config log report
ci-upstream-bpf-kasan-gce 2020/09/09 18:51 bpf 746f534a4809 0ea7a887 .config log report
ci-upstream-bpf-kasan-gce 2020/09/07 21:17 bpf e6135df45e21 abf9ba4f .config log report
ci-upstream-bpf-kasan-gce 2020/09/07 00:24 bpf e6135df45e21 abf9ba4f .config log report
ci-upstream-bpf-kasan-gce 2020/09/06 08:18 bpf e6135df45e21 abf9ba4f .config log report
ci-upstream-bpf-kasan-gce 2020/08/31 11:45 bpf fa4505675e09 d5a3ae1f .config log report
ci-upstream-bpf-kasan-gce 2020/08/30 11:59 bpf fa4505675e09 d5a3ae1f .config log report
ci-upstream-bpf-kasan-gce 2020/08/29 10:08 bpf fa4505675e09 d5a3ae1f .config log report
ci-upstream-bpf-kasan-gce 2020/08/29 03:35 bpf fa4505675e09 d5a3ae1f .config log report
ci-upstream-bpf-kasan-gce 2020/08/28 22:17 bpf fa4505675e09 d5a3ae1f .config log report
ci-upstream-bpf-kasan-gce 2020/08/25 15:00 bpf 7787b6fc938e 344da168 .config log report
ci-upstream-bpf-kasan-gce 2020/08/22 12:03 bpf 4af7b32f84aa 6436ce4b .config log report
ci-upstream-bpf-kasan-gce 2020/08/22 02:42 bpf 4af7b32f84aa 6436ce4b .config log report
ci-upstream-bpf-kasan-gce 2020/07/07 07:40 bpf ad4e2b648397 51095195 .config log report
ci-upstream-bpf-kasan-gce 2020/07/03 07:19 bpf e708e2bd55c9 bed10395 .config log report
ci-upstream-bpf-kasan-gce 2020/06/25 09:42 bpf 4e15507fea70 54566aff .config log report
ci-upstream-bpf-kasan-gce 2020/06/25 00:00 bpf 4e15507fea70 54566aff .config log report
ci-upstream-bpf-kasan-gce 2020/06/12 15:06 bpf 2c4779eff837 58802067 .config log report
ci-upstream-bpf-kasan-gce 2020/04/18 05:39 bpf edadedf1c5b4 435c6d53 .config log report
ci-upstream-bpf-next-kasan-gce 2020/10/20 22:12 bpf-next 9ff9b0d392ea ff4a3345 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/10/11 16:35 bpf-next ac53a0d3107c 4a77ae0b .config log report info
ci-upstream-bpf-next-kasan-gce 2020/10/11 11:53 bpf-next ac53a0d3107c 4a77ae0b .config log report info
ci-upstream-bpf-next-kasan-gce 2020/10/11 07:11 bpf-next ac53a0d3107c 4a77ae0b .config log report info
ci-upstream-bpf-next-kasan-gce 2020/10/11 02:15 bpf-next ac53a0d3107c 4a77ae0b .config log report info
ci-upstream-bpf-next-kasan-gce 2020/10/11 01:01 bpf-next ac53a0d3107c 4a77ae0b .config log report info
ci-upstream-bpf-next-kasan-gce 2020/10/01 02:37 bpf-next b0efc216f577 8516f6d3 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/09/28 14:32 bpf-next ba5f4cfeac77 6bfdbe89 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/09/24 23:55 bpf-next 0789e13bc3f8 54289b08 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/09/24 20:17 bpf-next 0789e13bc3f8 54289b08 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/09/24 06:22 bpf-next 0789e13bc3f8 54289b08 .config log report info
ci-upstream-net-kasan-gce 2020/09/22 23:22 net-next 92ec804f3dbf 3e8f6c27 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/09/20 10:42 bpf-next 70b971118e07 53ce8104 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/09/20 09:14 bpf-next 70b971118e07 53ce8104 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/09/13 03:42 bpf-next 2bab48c5bef0 ce441f06 .config log report
ci-upstream-bpf-next-kasan-gce 2020/09/11 17:04 bpf-next 18841da98100 adfb8b4e .config log report
ci-upstream-bpf-next-kasan-gce 2020/09/11 03:27 bpf-next 8081ede1f731 409809d8 .config log report
ci-upstream-bpf-next-kasan-gce 2020/09/10 06:16 bpf-next 7fb5eefd7639 409809d8 .config log report
ci-upstream-bpf-next-kasan-gce 2020/09/08 15:50 bpf-next bc0b5a03079b abf9ba4f .config log report
ci-upstream-bpf-next-kasan-gce 2020/09/07 05:08 bpf-next f9bec5d756b3 abf9ba4f .config log report
ci-upstream-bpf-next-kasan-gce 2020/09/06 03:44 bpf-next f9bec5d756b3 abf9ba4f .config log report
ci-upstream-bpf-next-kasan-gce 2020/09/05 19:58 bpf-next f9bec5d756b3 abf9ba4f .config log report
ci-upstream-bpf-next-kasan-gce 2020/09/05 18:53 bpf-next f9bec5d756b3 abf9ba4f .config log report
ci-upstream-bpf-next-kasan-gce 2020/09/05 03:39 bpf-next 95cec14b0308 abf9ba4f .config log report
ci-upstream-bpf-next-kasan-gce 2020/09/04 05:49 bpf-next 83cf5c68d663 abf9ba4f .config log report
ci-upstream-bpf-next-kasan-gce 2020/09/02 19:14 bpf-next 968be23ceaca abf9ba4f .config log report
ci-upstream-bpf-next-kasan-gce 2020/08/31 07:43 bpf-next 10496f261ed3 d5a3ae1f .config log report
ci-upstream-bpf-next-kasan-gce 2020/08/28 07:22 bpf-next 2e80be60c465 816e0689 .config log report
ci-upstream-bpf-next-kasan-gce 2020/08/27 22:23 bpf-next 2e80be60c465 816e0689 .config log report
ci-upstream-bpf-next-kasan-gce 2020/08/26 17:36 bpf-next cd04b04de119 318430cb .config log report
ci-upstream-bpf-next-kasan-gce 2020/08/26 03:29 bpf-next 0fcdfffe8034 344da168 .config log report
ci-upstream-bpf-next-kasan-gce 2020/08/24 23:58 bpf-next 9c0f8cbdc0e9 67b599d1 .config log report
ci-upstream-bpf-next-kasan-gce 2020/08/22 15:46 bpf-next 9c0f8cbdc0e9 6436ce4b .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/29 03:55 bpf-next cb8e59cc8720 a2cdad9d .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/18 17:46 bpf-next cb8e59cc8720 d45a4d69 .config log report
ci-upstream-bpf-next-kasan-gce 2020/05/23 20:02 bpf-next a5dfaa2ab940 9682898d .config log report
ci-upstream-bpf-next-kasan-gce 2020/05/22 13:32 bpf-next 29ae90d22175 5afa2ddd .config log report
ci-upstream-bpf-next-kasan-gce 2020/05/20 05:51 bpf-next dda18a5c0b75 67fa1f59 .config log report
ci-upstream-bpf-next-kasan-gce 2020/05/17 08:19 bpf-next 96586dd9268d 37bccd4e .config log report
ci-upstream-bpf-next-kasan-gce 2020/04/15 11:59 bpf-next 1a323ea5356e 3f3c5574 .config log report
ci-upstream-bpf-next-kasan-gce 2020/02/23 09:29 bpf-next 8eece07c011f 2c36e7a7 .config log report