From 4f8bde99c175ffd86b5125098a4707d43f5e80c6 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Wed, 13 Mar 2019 09:32:51 +0000 Subject: 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 with additional entries by: Signed-off-by: Ganesh Maharaj Mahalingam Signed-off-by: Masayoshi Mizuma Signed-off-by: Misono Tomohiro Signed-off-by: piaojun Signed-off-by: Vivek Goyal Signed-off-by: Eric Ren Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/Makefile.objs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/virtiofsd/Makefile.objs') diff --git a/tools/virtiofsd/Makefile.objs b/tools/virtiofsd/Makefile.objs index 45a807500d..076f667e46 100644 --- a/tools/virtiofsd/Makefile.objs +++ b/tools/virtiofsd/Makefile.objs @@ -5,5 +5,8 @@ virtiofsd-obj-y = buffer.o \ fuse_signals.o \ fuse_virtio.o \ helper.o \ - passthrough_ll.o + passthrough_ll.o \ + seccomp.o +seccomp.o-cflags := $(SECCOMP_CFLAGS) +seccomp.o-libs := $(SECCOMP_LIBS) -- cgit v1.2.3