KASAN: use-after-free Read in tcp_retransmit_timer (2)

8 views
Skip to first unread message

syzbot

unread,
Feb 1, 2021, 11:20:17 PM2/1/21
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 811218ec Linux 4.19.172
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12ccb6a0d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=c1cb1d27398c8808
dashboard link: https://syzkaller.appspot.com/bug?extid=4d6d18ff738428d7546b

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+4d6d18...@syzkaller.appspotmail.com

IPv6: ADDRCONF(NETDEV_CHANGE): veth0_virt_wifi: link becomes ready
IPv6: ADDRCONF(NETDEV_UP): veth0_vlan: link is not ready
IPv6: ADDRCONF(NETDEV_UP): vlan0: link is not ready
IPv6: ADDRCONF(NETDEV_UP): vlan1: link is not ready
==================================================================
BUG: KASAN: use-after-free in tcp_retransmit_timer+0x305e/0x3470 net/ipv4/tcp_timer.c:485
Read of size 8 at addr ffff888055f60378 by task syz-fuzzer/8104

CPU: 0 PID: 8104 Comm: syz-fuzzer Not tainted 4.19.172-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+0x305e/0x3470 net/ipv4/tcp_timer.c:485
tcp_write_timer_handler+0x5e6/0xa60 net/ipv4/tcp_timer.c:598
tcp_write_timer+0x103/0x1b0 net/ipv4/tcp_timer.c:618
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:545 [inline]
smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1094
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894
</IRQ>
RIP: 0033:0x4154d4
Code: 80 fe 40 48 19 ff 48 29 d8 48 21 c2 48 8d 04 13 48 89 cb 89 f1 48 d3 ea 48 21 fa 48 89 44 24 50 48 89 5c 24 58 48 89 54 24 60 <48> 8b 6c 24 28 48 83 c4 30 c3 48 29 d8 48 8b 51 68 48 39 d0 72 44
RSP: 002b:000000c000071e70 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13
RAX: 000000c000c59cc0 RBX: 00007ff4683ad5d0 RCX: 0000000000000004
RDX: 00000000000001cc RSI: 0000000000000004 RDI: ffffffffffffffff
RBP: 000000c000071e98 R08: 00007ff468ad3fff R09: 000000c000cf4800
R10: 000000c00001fe98 R11: 00000000000002a8 R12: 000000c000c59cc0
R13: 000000c000001500 R14: 0000000000926114 R15: 0000000000000000

Allocated by task 8132:
kmem_cache_alloc+0x122/0x370 mm/slab.c:3559
kmem_cache_zalloc include/linux/slab.h:699 [inline]
net_alloc net/core/net_namespace.c:385 [inline]
copy_net_ns+0x106/0x340 net/core/net_namespace.c:425
create_new_namespaces+0x3f6/0x7b0 kernel/nsproxy.c:107
unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:206
ksys_unshare+0x36c/0x9a0 kernel/fork.c:2541
__do_sys_unshare kernel/fork.c:2609 [inline]
__se_sys_unshare kernel/fork.c:2607 [inline]
__x64_sys_unshare+0x2d/0x40 kernel/fork.c:2607
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 7:
__cache_free mm/slab.c:3503 [inline]
kmem_cache_free+0x7f/0x260 mm/slab.c:3765
net_free net/core/net_namespace.c:401 [inline]
net_drop_ns+0x73/0x90 net/core/net_namespace.c:408
cleanup_net+0x64c/0x8b0 net/core/net_namespace.c:571
process_one_work+0x864/0x1570 kernel/workqueue.c:2155
worker_thread+0x64c/0x1130 kernel/workqueue.c:2298
kthread+0x33f/0x460 kernel/kthread.c:259
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

The buggy address belongs to the object at ffff888055f60140
which belongs to the cache net_namespace of size 8640
The buggy address is located 568 bytes inside of
8640-byte region [ffff888055f60140, ffff888055f62300)
The buggy address belongs to the page:
page:ffffea000157d800 count:1 mapcount:0 mapping:ffff8880b5bbed80 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea0001586f08 ffffea00011d1008 ffff8880b5bbed80
raw: 0000000000000000 ffff888055f60140 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff888055f60200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888055f60280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888055f60300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888055f60380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888055f60400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================


---
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,
Nov 15, 2021, 10:14:15 PM11/15/21
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