Open Tim--- opened 1 year ago
@Tim--- Did you ever find a fix for this?
Well, it's been a while, so I don't remember what I did. But the code has barely changed since then. Apparently, the hook is only called for specific network interface ioctls here:
I guess you have to modify the code of ql_syscall_ioctl
if you want it to call your hook.
Hi there,
Qiling is flexible enough to let you add your own customized handling. Here you could hook ioctl
on exit to let your custom handler review the given parameters and take action for a certain set of values.
@Tim--- , @elicn Thanks for the tips. I'll give them a go
Is your feature request related to a problem? Please describe.
Hi,
I am trying to implement a custom
QlFsMappedObject
with ioctl support. Looking at the class, it seems that I need to override theioctl
method.https://github.com/qilingframework/qiling/blob/f3e66ec290b8c7a0ee60bc2f2715ddc6e9389216/qiling/os/mapper.py#L44-L45
However, my handler is never called, and the "strace" output shows a -EPERM result when the ioctl syscall is made.
From what I see, the ioctl calls ends up in ql_syscall_ioctl, which only handles a few ioctl commands, and returns -1 (aka -EPERM) if the ioctl is not in the whitelist.
Contrary to other methods like ql_syscall_read, it does not seem to call the handler method.
Describe the solution you'd like
Did I miss something, or is the ioctl not currently implemented ?