Skip to content

Commit 4392ebc

Browse files
authored
Merge pull request from GHSA-wr4f-w546-m398
do not set the inheritable capabilities
2 parents 11f8923 + 1aeeed2 commit 4392ebc

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ crun_command_exec (struct crun_global_arguments *global_args, int argc, char **a
304304
capabilities->effective = exec_options.cap;
305305
capabilities->effective_len = exec_options.cap_size;
306306

307-
capabilities->inheritable = dup_array (exec_options.cap, exec_options.cap_size);
308-
capabilities->inheritable_len = exec_options.cap_size;
307+
capabilities->inheritable = NULL;
308+
capabilities->inheritable_len = 0;
309309

310310
capabilities->bounding = dup_array (exec_options.cap, exec_options.cap_size);
311311
capabilities->bounding_len = exec_options.cap_size;

src/libcrun/container.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@ static const char spec_file[] = "\
120120
\"CAP_NET_BIND_SERVICE\"\n\
121121
],\n\
122122
\"inheritable\": [\n\
123-
\"CAP_AUDIT_WRITE\",\n\
124-
\"CAP_KILL\",\n\
125-
\"CAP_NET_BIND_SERVICE\"\n\
126123
],\n\
127124
\"permitted\": [\n\
128125
\"CAP_AUDIT_WRITE\",\n\

0 commit comments

Comments
 (0)