mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
virtiofsd: add seccomp whitelist
Only allow system calls that are needed by virtiofsd. All other system calls cause SIGSYS to be directed at the thread and the process will coredump. Restricting system calls reduces the kernel attack surface and limits what the process can do when compromised. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> with additional entries by: Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com> Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com> Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> Signed-off-by: piaojun <piaojun@huawei.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Eric Ren <renzhen@linux.alibaba.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
8e1d4ef231
commit
4f8bde99c1
5 changed files with 174 additions and 3 deletions
|
@ -59,6 +59,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "passthrough_helpers.h"
|
||||
#include "seccomp.h"
|
||||
|
||||
struct lo_map_elem {
|
||||
union {
|
||||
|
@ -2091,6 +2092,7 @@ static void setup_sandbox(struct lo_data *lo, struct fuse_session *se)
|
|||
{
|
||||
setup_namespaces(lo, se);
|
||||
setup_mounts(lo->source);
|
||||
setup_seccomp();
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue