syzbot


memory leak in prepare_creds (3)
Status: upstream: reported C repro on 2022/04/21 02:56
Reported-by: syzbot+b43f20e5dc7bddc29028@syzkaller.appspotmail.com
First crash: 40d, last: 40d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream memory leak in prepare_creds (2) C 2 337d 432d 22/22 fixed on 2021/11/10 00:50
upstream memory leak in prepare_creds C 10 463d 637d 21/22 fixed on 2021/03/10 01:48

Sample crash report:
Warning: Permanently added '10.128.1.125' (ECDSA) to the list of known hosts.
executing program
executing program
BUG: memory leak
unreferenced object 0xffff888104810300 (size 176):
  comm "syz-executor344", pid 3589, jiffies 4294945176 (age 12.300s)
  hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff8127c3c7>] prepare_creds+0x27/0x470 kernel/cred.c:260
    [<ffffffff8127d1f0>] copy_creds+0x40/0x2c0 kernel/cred.c:365
    [<ffffffff812377fe>] copy_process+0x5ce/0x23d0 kernel/fork.c:2094
    [<ffffffff81239833>] kernel_clone+0xf3/0x660 kernel/fork.c:2639
    [<ffffffff81239e16>] __do_sys_clone+0x76/0xa0 kernel/fork.c:2756
    [<ffffffff8451da15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff8451da15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88810cc24a40 (size 1232):
  comm "syz-executor344", pid 3598, jiffies 4294945177 (age 12.290s)
  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:
    [<ffffffff837d1bee>] sk_prot_alloc+0x3e/0x1b0 net/core/sock.c:1930
    [<ffffffff837d5862>] sk_alloc+0x32/0x2e0 net/core/sock.c:1989
    [<ffffffff842d78f8>] __vsock_create.constprop.0+0x38/0x320 net/vmw_vsock/af_vsock.c:734
    [<ffffffff842d9281>] vsock_create+0xc1/0x2d0 net/vmw_vsock/af_vsock.c:2203
    [<ffffffff837ca49b>] __sock_create+0x1ab/0x2b0 net/socket.c:1468
    [<ffffffff837cd41f>] sock_create net/socket.c:1519 [inline]
    [<ffffffff837cd41f>] __sys_socket+0x6f/0x140 net/socket.c:1561
    [<ffffffff837cd50a>] __do_sys_socket net/socket.c:1570 [inline]
    [<ffffffff837cd50a>] __se_sys_socket net/socket.c:1568 [inline]
    [<ffffffff837cd50a>] __x64_sys_socket+0x1a/0x20 net/socket.c:1568
    [<ffffffff8451da15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff8451da15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88810ea7e8e0 (size 32):
  comm "syz-executor344", pid 3598, jiffies 4294945177 (age 12.290s)
  hex dump (first 32 bytes):
    b0 2e 04 40 81 88 ff ff 00 00 00 00 00 00 00 00  ...@............
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff82205353>] kmalloc include/linux/slab.h:581 [inline]
    [<ffffffff82205353>] kzalloc include/linux/slab.h:714 [inline]
    [<ffffffff82205353>] apparmor_sk_alloc_security+0x53/0xd0 security/apparmor/lsm.c:792
    [<ffffffff821caf11>] security_sk_alloc+0x31/0x70 security/security.c:2279
    [<ffffffff837d1c45>] sk_prot_alloc+0x95/0x1b0 net/core/sock.c:1939
    [<ffffffff837d5862>] sk_alloc+0x32/0x2e0 net/core/sock.c:1989
    [<ffffffff842d78f8>] __vsock_create.constprop.0+0x38/0x320 net/vmw_vsock/af_vsock.c:734
    [<ffffffff842d9281>] vsock_create+0xc1/0x2d0 net/vmw_vsock/af_vsock.c:2203
    [<ffffffff837ca49b>] __sock_create+0x1ab/0x2b0 net/socket.c:1468
    [<ffffffff837cd41f>] sock_create net/socket.c:1519 [inline]
    [<ffffffff837cd41f>] __sys_socket+0x6f/0x140 net/socket.c:1561
    [<ffffffff837cd50a>] __do_sys_socket net/socket.c:1570 [inline]
    [<ffffffff837cd50a>] __se_sys_socket net/socket.c:1568 [inline]
    [<ffffffff837cd50a>] __x64_sys_socket+0x1a/0x20 net/socket.c:1568
    [<ffffffff8451da15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff8451da15>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
    [<ffffffff84600068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff88810d6b4100 (size 96):
  comm "syz-executor344", pid 3598, jiffies 4294945177 (age 12.290s)
  hex dump (first 32 bytes):
    40 4a c2 0c 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:
    [<ffffffff842de0c7>] kmalloc include/linux/slab.h:581 [inline]
    [<ffffffff842de0c7>] kzalloc include/linux/slab.h:714 [inline]
    [<ffffffff842de0c7>] virtio_transport_do_socket_init+0x27/0xe0 net/vmw_vsock/virtio_transport_common.c:593
    [<ffffffff842d6480>] vsock_assign_transport+0x200/0x320 net/vmw_vsock/af_vsock.c:502
    [<ffffffff842da238>] vsock_connect+0x128/0x5d0 net/vmw_vsock/af_vsock.c:1345
    [<ffffffff837ce072>] __sys_connect_file+0x92/0xa0 net/socket.c:1900
    [<ffffffff8166bbda>] io_connect+0x8a/0x370 fs/io_uring.c:5679
    [<ffffffff8167326d>] io_issue_sqe+0x119d/0x3210 fs/io_uring.c:7171
    [<ffffffff81675dd3>] __io_queue_sqe fs/io_uring.c:7499 [inline]
    [<ffffffff81675dd3>] io_queue_sqe fs/io_uring.c:7541 [inline]
    [<ffffffff81675dd3>] io_submit_sqe fs/io_uring.c:7746 [inline]
    [<ffffffff81675dd3>] io_submit_sqes+0x553/0x3020 fs/io_uring.c:7852
    [<ffffffff81678faa>] __do_sys_io_uring_enter+0x70a/0x1110 fs/io_uring.c:10797
    [<ffffffff8451da15>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
    [<ffffffff8451da15>] do_syscall_64+0x35/0xb0 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/17 02:48 upstream 90ea17a9e27b 8bcc32a6 .config log report syz C memory leak in prepare_creds