aboutgitcodebugslistschat
path: root/passt.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-02-17 01:30:43 +0100
committerStefano Brivio <sbrivio@redhat.com>2022-02-21 13:41:13 +0100
commitfb70301b1358a7a65e0f6089ee9349330db2465a (patch)
tree297c86a9ba74d4163ada87adbf5551b0f9ffb623 /passt.c
parent0515adceaa8f69a1d85ae3c8c550c37dd49b0c47 (diff)
downloadpasst-fb70301b1358a7a65e0f6089ee9349330db2465a.tar
passt-fb70301b1358a7a65e0f6089ee9349330db2465a.tar.gz
passt-fb70301b1358a7a65e0f6089ee9349330db2465a.tar.bz2
passt-fb70301b1358a7a65e0f6089ee9349330db2465a.tar.lz
passt-fb70301b1358a7a65e0f6089ee9349330db2465a.tar.xz
passt-fb70301b1358a7a65e0f6089ee9349330db2465a.tar.zst
passt-fb70301b1358a7a65e0f6089ee9349330db2465a.zip
passt: Make process not dumpable after sandboxing
Two effects: - ptrace() on passt and pasta can only be done by root, so that even if somebody gains access to the same user, they won't be able to check data passed in syscalls anyway. No core dumps allowed either - /proc/PID files are owned by root:root, and they can't be read by the same user as the one passt or pasta are running with Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'passt.c')
-rw-r--r--passt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/passt.c b/passt.c
index 508d525..b5086d8 100644
--- a/passt.c
+++ b/passt.c
@@ -406,6 +406,8 @@ int main(int argc, char **argv)
else
write_pidfile(pidfile_fd, getpid());
+ prctl(PR_SET_DUMPABLE, 0);
+
seccomp(&c);
timer_init(&c, &now);