Manifest definition to allow SIOCGIFCONF IOCTL #1733
-
Hi community,
From that message, I concluded that it must be related to the allowed_ioctls parameter in the gramine manifest. I have found a test manifest in this repository, which contains an example of how to allow such an IOCTL: gramine/libos/test/ltp/manifest.template Line 56 in 36676a7 Since my understanding of IOCTL is very abstract, I copy-pasted the following snippet to my manifest:
but now I am getting another error message during the start of the app:
-> Now it does not name the SIOCGIFCONF ioctl anymore, but just states "inappropriate ioctl". This leads to the conclusion that my copy-paste strategy did not work out here. -> It seems to me that I need a different, device-specific struct definition and ioctl request code. Where would I find such info? In the code of the host system's linux kernel? Any thoughts highly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Taking IOCTLs on sockets as an example, you can obtain such info from the man page, kernel source and public docs. You may also want to look into the source code of your application and/or w/ the help of error logs and
Pls also need read/follow carefully the allowed IOCTLs manifest syntax of Gramine, and consider adding hardening via sanitization. |
Beta Was this translation helpful? Give feedback.
Taking IOCTLs on sockets as an example, you can obtain such info from the man page, kernel source and public docs.
You may also want to look into the source code of your application and/or w/ the help of error logs and
strace
to understand more about how your application uses IOCTLs exactly.getFlags()
indicated that ^ error may come fromioctl(..., SIOCGIFFLAGS, ...)
. Looking into e.g. the source cod…