lkml.org 
[lkml]   [2021]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subject[syzbot] memory leak in kvm_dev_ioctl
From
Hello,

syzbot found the following issue on:

HEAD commit: e058a84b Merge tag 'drm-next-2021-07-01' of git://anongit...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=171fbbdc300000
kernel config: https://syzkaller.appspot.com/x/.config?x=8c46abb9076f44dc
dashboard link: https://syzkaller.appspot.com/bug?extid=c87d2efb740931ec76c7
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=119d1efc300000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16c58c28300000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+c87d2efb740931ec76c7@syzkaller.appspotmail.com

executing program
BUG: memory leak
unreferenced object 0xffff888101be6180 (size 32):
comm "syz-executor591", pid 8432, jiffies 4294944117 (age 12.420s)
hex dump (first 32 bytes):
00 10 dc 00 00 c9 ff ff 20 ee 80 84 ff ff ff ff ........ .......
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81043830>] kmalloc include/linux/slab.h:591 [inline]
[<ffffffff81043830>] kzalloc include/linux/slab.h:721 [inline]
[<ffffffff81043830>] kvm_create_vm_debugfs arch/x86/kvm/../../../virt/kvm/kvm_main.c:916 [inline]
[<ffffffff81043830>] kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:4471 [inline]
[<ffffffff81043830>] kvm_dev_ioctl+0x710/0xb60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4498
[<ffffffff81588bec>] vfs_ioctl fs/ioctl.c:51 [inline]
[<ffffffff81588bec>] __do_sys_ioctl fs/ioctl.c:1069 [inline]
[<ffffffff81588bec>] __se_sys_ioctl fs/ioctl.c:1055 [inline]
[<ffffffff81588bec>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:1055
[<ffffffff84396e45>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff84396e45>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff888101c620a0 (size 32):
comm "syz-executor591", pid 8432, jiffies 4294944117 (age 12.420s)
hex dump (first 32 bytes):
00 10 dc 00 00 c9 ff ff e0 ee 80 84 ff ff ff ff ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81043830>] kmalloc include/linux/slab.h:591 [inline]
[<ffffffff81043830>] kzalloc include/linux/slab.h:721 [inline]
[<ffffffff81043830>] kvm_create_vm_debugfs arch/x86/kvm/../../../virt/kvm/kvm_main.c:916 [inline]
[<ffffffff81043830>] kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:4471 [inline]
[<ffffffff81043830>] kvm_dev_ioctl+0x710/0xb60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4498
[<ffffffff81588bec>] vfs_ioctl fs/ioctl.c:51 [inline]
[<ffffffff81588bec>] __do_sys_ioctl fs/ioctl.c:1069 [inline]
[<ffffffff81588bec>] __se_sys_ioctl fs/ioctl.c:1055 [inline]
[<ffffffff81588bec>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:1055
[<ffffffff84396e45>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff84396e45>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff888101c62360 (size 32):
comm "syz-executor591", pid 8432, jiffies 4294944118 (age 12.410s)
hex dump (first 32 bytes):
00 10 dc 00 00 c9 ff ff 20 ef 80 84 ff ff ff ff ........ .......
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81043830>] kmalloc include/linux/slab.h:591 [inline]
[<ffffffff81043830>] kzalloc include/linux/slab.h:721 [inline]
[<ffffffff81043830>] kvm_create_vm_debugfs arch/x86/kvm/../../../virt/kvm/kvm_main.c:916 [inline]
[<ffffffff81043830>] kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:4471 [inline]
[<ffffffff81043830>] kvm_dev_ioctl+0x710/0xb60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4498
[<ffffffff81588bec>] vfs_ioctl fs/ioctl.c:51 [inline]
[<ffffffff81588bec>] __do_sys_ioctl fs/ioctl.c:1069 [inline]
[<ffffffff81588bec>] __se_sys_ioctl fs/ioctl.c:1055 [inline]
[<ffffffff81588bec>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:1055
[<ffffffff84396e45>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff84396e45>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff888101c62ba0 (size 32):
comm "syz-executor591", pid 8432, jiffies 4294944118 (age 12.410s)
hex dump (first 32 bytes):
00 10 dc 00 00 c9 ff ff 60 ef 80 84 ff ff ff ff ........`.......
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81043830>] kmalloc include/linux/slab.h:591 [inline]
[<ffffffff81043830>] kzalloc include/linux/slab.h:721 [inline]
[<ffffffff81043830>] kvm_create_vm_debugfs arch/x86/kvm/../../../virt/kvm/kvm_main.c:916 [inline]
[<ffffffff81043830>] kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:4471 [inline]
[<ffffffff81043830>] kvm_dev_ioctl+0x710/0xb60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4498
[<ffffffff81588bec>] vfs_ioctl fs/ioctl.c:51 [inline]
[<ffffffff81588bec>] __do_sys_ioctl fs/ioctl.c:1069 [inline]
[<ffffffff81588bec>] __se_sys_ioctl fs/ioctl.c:1055 [inline]
[<ffffffff81588bec>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:1055
[<ffffffff84396e45>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff84396e45>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff888101c62b20 (size 32):
comm "syz-executor591", pid 8432, jiffies 4294944118 (age 12.410s)
hex dump (first 32 bytes):
00 10 dc 00 00 c9 ff ff a0 ef 80 84 ff ff ff ff ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81043830>] kmalloc include/linux/slab.h:591 [inline]
[<ffffffff81043830>] kzalloc include/linux/slab.h:721 [inline]
[<ffffffff81043830>] kvm_create_vm_debugfs arch/x86/kvm/../../../virt/kvm/kvm_main.c:916 [inline]
[<ffffffff81043830>] kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:4471 [inline]
[<ffffffff81043830>] kvm_dev_ioctl+0x710/0xb60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4498
[<ffffffff81588bec>] vfs_ioctl fs/ioctl.c:51 [inline]
[<ffffffff81588bec>] __do_sys_ioctl fs/ioctl.c:1069 [inline]
[<ffffffff81588bec>] __se_sys_ioctl fs/ioctl.c:1055 [inline]
[<ffffffff81588bec>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:1055
[<ffffffff84396e45>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff84396e45>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff888101c62660 (size 32):
comm "syz-executor591", pid 8432, jiffies 4294944118 (age 12.410s)
hex dump (first 32 bytes):
00 10 dc 00 00 c9 ff ff e0 ef 80 84 ff ff ff ff ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81043830>] kmalloc include/linux/slab.h:591 [inline]
[<ffffffff81043830>] kzalloc include/linux/slab.h:721 [inline]
[<ffffffff81043830>] kvm_create_vm_debugfs arch/x86/kvm/../../../virt/kvm/kvm_main.c:916 [inline]
[<ffffffff81043830>] kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:4471 [inline]
[<ffffffff81043830>] kvm_dev_ioctl+0x710/0xb60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4498
[<ffffffff81588bec>] vfs_ioctl fs/ioctl.c:51 [inline]
[<ffffffff81588bec>] __do_sys_ioctl fs/ioctl.c:1069 [inline]
[<ffffffff81588bec>] __se_sys_ioctl fs/ioctl.c:1055 [inline]
[<ffffffff81588bec>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:1055
[<ffffffff84396e45>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff84396e45>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae

BUG: memory leak
unreferenced object 0xffff888101c62460 (size 32):
comm "syz-executor591", pid 8432, jiffies 4294944118 (age 12.410s)
hex dump (first 32 bytes):
00 10 dc 00 00 c9 ff ff 20 f0 80 84 ff ff ff ff ........ .......
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff81043830>] kmalloc include/linux/slab.h:591 [inline]
[<ffffffff81043830>] kzalloc include/linux/slab.h:721 [inline]
[<ffffffff81043830>] kvm_create_vm_debugfs arch/x86/kvm/../../../virt/kvm/kvm_main.c:916 [inline]
[<ffffffff81043830>] kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:4471 [inline]
[<ffffffff81043830>] kvm_dev_ioctl+0x710/0xb60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4498
[<ffffffff81588bec>] vfs_ioctl fs/ioctl.c:51 [inline]
[<ffffffff81588bec>] __do_sys_ioctl fs/ioctl.c:1069 [inline]
[<ffffffff81588bec>] __se_sys_ioctl fs/ioctl.c:1055 [inline]
[<ffffffff81588bec>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:1055
[<ffffffff84396e45>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff84396e45>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[<ffffffff84400068>] entry_SYSCALL_64_after_hwframe+0x44/0xae



---
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 syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

\
 
 \ /
  Last update: 2021-07-03 08:06    [W:0.062 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site