syzbot


memory leak in __vsock_create

Status: upstream: reported C repro on 2022/04/10 05:46
Reported-by: syzbot+b03f55bf128f9a38f064@syzkaller.appspotmail.com
Fix commit: 7e97cfed9929 vsock: Fix memory leak in vsock_connect()
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 175d, last: 175d
Patch testing requests:
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):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-gce-leak 2022/04/06 05:41 upstream ce4c854ee868 0127c10f .config log report syz C memory leak in __vsock_create
* Struck through repros no longer work on HEAD.