no syscalls can create resource (kvm)

216 views
Skip to first unread message

sush...@gmail.com

unread,
Feb 21, 2020, 2:57:29 AM2/21/20
to syzkaller
hi

i want to only fuzz this specific module and am trying to use the default already included /sys/linux/dev_kvm.txt
referencing that file, i have this added into my config file:

"enable_syscalls": [
        "openat$kvm",
        "ioctl$KVM*",
        "syz_kvm_setup_cpu$x86",
    ]

I get a lot of these errors for many ioctls:
disabling ioctl$KVM_CREATE_VM: no syscalls can create resource fd_kvm, enable some syscalls that can create it [openat$kvm]

and seems like no fd is being created.

i tried to use syz_open_dev$kvm as i thought it is used to pass fd to ioctl but it gives 'unknown enabled syscall"

how do i go about fixing this?

Dmitry Vyukov

unread,
Feb 21, 2020, 4:27:17 AM2/21/20
to sush...@gmail.com, syzkaller
Hi,

Please read the error message you posted carefully. It contains the answer ;)

sush...@gmail.com

unread,
Feb 21, 2020, 5:04:41 AM2/21/20
to syzkaller
Pardon me as I'm not very familiar with linux, but I used strace while creating a VM with KVM, and added all the syscalls that showed up. Yet I still get this error. I have also tried including all the syscalls that are required to create a file descriptor but to no avail. Usually what is the way to determine what syscalls are used by a particular ioctl?

Dmitry Vyukov

unread,
Feb 21, 2020, 5:24:47 AM2/21/20
to sush...@gmail.com, syzkaller
On Fri, Feb 21, 2020 at 11:04 AM <sush...@gmail.com> wrote:
>
> Pardon me as I'm not very familiar with linux, but I used strace while creating a VM with KVM, and added all the syscalls that showed up. Yet I still get this error. I have also tried including all the syscalls that are required to create a file descriptor but to no avail. Usually what is the way to determine what syscalls are used by a particular ioctl?

It's right there in the error message you posted, it says what you need to do:

disabling ioctl$KVM_CREATE_VM: no syscalls can create resource fd_kvm,
enable some syscalls that can create it [openat$kvm]

It's openat$kvm.
Where did you get the syz_open_dev$kvm name? Please send a PR to fix
docs if it's in some docs.

sush...@gmail.com

unread,
Feb 21, 2020, 7:34:40 AM2/21/20
to syzkaller
The syscall I have to enable is openat$kvm?
I thought I already have it in my config file.

"enable_syscalls": [
"openat$kvm",
"ioctl$KVM*",
"syz_kvm_setup_cpu$x86",
]

Is there somewhere else I have to put it to enable that syscall?

Dmitry Vyukov

unread,
Feb 21, 2020, 7:50:06 AM2/21/20
to sush...@gmail.com, syzkaller
No, nowhere else. This should work. Please post full manager output
and full config.

ctf sushi

unread,
Feb 23, 2020, 9:16:09 PM2/23/20
to syzkaller


---------- Forwarded message ---------
From: ctf sushi <sush...@gmail.com>
Date: Sun, Feb 23, 2020 at 6:12 PM
Subject: Re: no syscalls can create resource (kvm)
To: Dmitry Vyukov <dvy...@google.com>


Attached the 2 files. I am using this cfg file and this is the output I am getting. Ends with all system calls are disabled.
output.txt
myconfig.cfg

sush...@gmail.com

unread,
Feb 23, 2020, 9:20:45 PM2/23/20
to syzkaller
Oh and ignore the fact that as shown in output.txt, i am using "my.cfg" as config file. I created a new copy "myconfig.cfg" to mask out the paths
Reply all
Reply to author
Forward
0 new messages