Преглед изворни кода

profiles: seccomp: add syscalls related to PKU in default policy

Add pkey_alloc(2), pkey_free(2) and pkey_mprotect(2) in seccomp default profile.
pkey_alloc(2), pkey_free(2) and pkey_mprotect(2) can only configure
the calling process's own memory, so they are existing "safe for everyone" syscalls.

close issue: #43481

Signed-off-by: zhubojun <bojun.zhu@foxmail.com>
zhubojun пре 3 година
родитељ
комит
e258d66f17
2 измењених фајлова са 6 додато и 0 уклоњено
  1. 3 0
      profiles/seccomp/default.json
  2. 3 0
      profiles/seccomp/default_linux.go

+ 3 - 0
profiles/seccomp/default.json

@@ -248,6 +248,9 @@
 				"pidfd_send_signal",
 				"pidfd_send_signal",
 				"pipe",
 				"pipe",
 				"pipe2",
 				"pipe2",
+				"pkey_alloc",
+				"pkey_free",
+				"pkey_mprotect",
 				"poll",
 				"poll",
 				"ppoll",
 				"ppoll",
 				"ppoll_time64",
 				"ppoll_time64",

+ 3 - 0
profiles/seccomp/default_linux.go

@@ -240,6 +240,9 @@ func DefaultProfile() *Seccomp {
 					"pidfd_send_signal",
 					"pidfd_send_signal",
 					"pipe",
 					"pipe",
 					"pipe2",
 					"pipe2",
+					"pkey_alloc",
+					"pkey_free",
+					"pkey_mprotect",
 					"poll",
 					"poll",
 					"ppoll",
 					"ppoll",
 					"ppoll_time64",
 					"ppoll_time64",