syzbot


memory leak in __vsock_create

Status: fixed on 2023/02/24 13:50
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+b03f55bf128f9a38f064@syzkaller.appspotmail.com
Fix commit: 7e97cfed9929 vsock: Fix memory leak in vsock_connect()
First crash: 955d, last: 955d
Discussions (9)
Title Replies (including bot) Last reply
[PATCH 5.4 000/389] 5.4.211-rc1 review 396 (396) 2022/10/26 16:43
[PATCH 5.19 000/365] 5.19.4-rc1 review 384 (384) 2022/08/29 09:33
[PATCH 4.19 000/287] 4.19.256-rc1 review 298 (298) 2022/08/25 10:11
[PATCH 4.9 000/101] 4.9.326-rc1 review 108 (108) 2022/08/24 07:24
[PATCH 4.14 000/229] 4.14.291-rc1 review 232 (232) 2022/08/24 06:23
[PATCH 5.15 000/244] 5.15.63-rc1 review 247 (247) 2022/08/23 21:46
[PATCH 5.10 000/158] 5.10.138-rc1 review 159 (159) 2022/08/23 08:28
[PATCH RFC net-next] vsock: Reschedule connect_work for O_NONBLOCK connect() requests 13 (13) 2022/08/10 09:00
[syzbot] memory leak in __vsock_create 0 (1) 2022/04/10 05:46
Last patch testing requests (11)
Created Duration User Patch Repo Result
2022/08/07 03:16 16m yepeilin.cs@gmail.com patch upstream OK log
2022/08/05 00:07 16m yepeilin.cs@gmail.com patch upstream OK log
2022/08/04 23:54 0m yepeilin.cs@gmail.com patch upstream error
2022/07/29 12:48 7m sgarzare@redhat.com https://github.com/torvalds/linux.git master report log
2022/07/29 11:35 15m sgarzare@redhat.com https://gitlab.com/sgarzarella/linux.git fix-vsock-leak OK log
2022/05/08 12:50 15m jeliantsurux@gmail.com patch https://github.com/google/kasan.git ce4c854ee868 OK
2022/04/20 03:15 7m zhaojunkui2008@126.com patch upstream report log
2022/04/20 02:30 11m zhaojunkui2008@126.com patch upstream report log
2022/04/20 02:07 11m zhaojunkui2008@126.com patch upstream report log
2022/04/20 01:32 11m zhaojunkui2008@126.com patch upstream report log
2022/04/19 13:03 6m zhaojunkui2008@126.com patch upstream report log

Sample crash report:
Warning: Permanently added '10.128.1.36' (ECDSA) to the list of known hosts.
executing program
executing program
BUG: memory leak
unreferenced object 0xffff88810ea56a40 (size 1232):
  comm "syz-executor756", pid 3604, jiffies 4294947681 (age 12.350s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    28 00 07 40 00 00 00 00 00 00 00 00 00 00 00 00  (..@............
  backtrace:
    [<ffffffff837c830e>] sk_prot_alloc+0x3e/0x1b0 net/core/sock.c:1930
    [<ffffffff837cbe22>] sk_alloc+0x32/0x2e0 net/core/sock.c:1989
    [<ffffffff842ccf68>] __vsock_create.constprop.0+0x38/0x320 net/vmw_vsock/af_vsock.c:734
    [<ffffffff842ce8f1>] vsock_create+0xc1/0x2d0 net/vmw_vsock/af_vsock.c:2203
    [<ffffffff837c0cbb>] __sock_create+0x1ab/0x2b0 net/socket.c:1468
    [<ffffffff837c3acf>] sock_create net/socket.c:1519 [inline]
    [<ffffffff837c3acf>] __sys_socket+0x6f/0x140 net/socket.c:1561
    [<ffffffff837c3bba>] __do_sys_socket net/socket.c:1570 [inline]
    [<ffffffff837c3bba>] __se_sys_socket net/socket.c:1568 [inline]
    [<ffffffff837c3bba>] __x64_sys_socket+0x1a/0x20 net/socket.c:1568
    [<ffffffff84512815>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84512815>] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88810fb89080 (size 96):
  comm "syz-executor756", pid 3604, jiffies 4294947681 (age 12.350s)
  hex dump (first 32 bytes):
    40 6a a5 0e 81 88 ff ff 00 00 00 00 00 00 00 00  @j..............
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff842d3767>] kmalloc include/linux/slab.h:581 [inline]
    [<ffffffff842d3767>] kzalloc include/linux/slab.h:714 [inline]
    [<ffffffff842d3767>] virtio_transport_do_socket_init+0x27/0xe0 net/vmw_vsock/virtio_transport_common.c:593
    [<ffffffff842cbaf0>] vsock_assign_transport+0x200/0x320 net/vmw_vsock/af_vsock.c:502
    [<ffffffff842cf8a8>] vsock_connect+0x128/0x5d0 net/vmw_vsock/af_vsock.c:1345
    [<ffffffff837c4722>] __sys_connect_file+0x92/0xa0 net/socket.c:1900
    [<ffffffff81667a4a>] io_connect+0x8a/0x370 fs/io_uring.c:5711
    [<ffffffff8166ea49>] io_issue_sqe+0xb29/0x2cb0 fs/io_uring.c:7294
    [<ffffffff81671c09>] __io_queue_sqe fs/io_uring.c:7605 [inline]
    [<ffffffff81671c09>] io_queue_sqe fs/io_uring.c:7647 [inline]
    [<ffffffff81671c09>] io_submit_sqe fs/io_uring.c:7855 [inline]
    [<ffffffff81671c09>] io_submit_sqes+0xa99/0x2ed0 fs/io_uring.c:7961
    [<ffffffff81674581>] __do_sys_io_uring_enter+0x541/0xa20 fs/io_uring.c:11011
    [<ffffffff84512815>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff84512815>] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae


Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/04/06 05:41 upstream ce4c854ee868 0127c10f .config console log report syz C ci-upstream-gce-leak memory leak in __vsock_create
* Struck through repros no longer work on HEAD.