@@ -1114,8 +1114,6 @@ pub fn build_container_spec_for_image(
11141114 "DAC_OVERRIDE" . into( ) ,
11151115 // Not needed: the supervisor does not create setuid/setgid executables.
11161116 "FSETID" . into( ) ,
1117- // Not needed: the supervisor does not send signals to arbitrary processes.
1118- "KILL" . into( ) ,
11191117 // Not needed: the supervisor does not bind privileged ports (<1024).
11201118 "NET_BIND_SERVICE" . into( ) ,
11211119 // Not in Podman's default set but explicitly denied in case the image
@@ -1146,6 +1144,9 @@ pub fn build_container_spec_for_image(
11461144 // Child setup clears the capability bounding set before exec, which
11471145 // requires CAP_SETPCAP in the supervisor until drop_privileges().
11481146 "SETPCAP" . into( ) ,
1147+ // Forwarding shutdown signals to the canonical workload process
1148+ // group after it drops to the sandbox UID requires CAP_KILL.
1149+ "KILL" . into( ) ,
11491150 ] ,
11501151 // SETUID, SETGID, SETPCAP, CHOWN, and FOWNER are intentionally kept from
11511152 // Podman's default set and not dropped:
@@ -1885,6 +1886,7 @@ mod tests {
18851886 "missing DAC_READ_SEARCH"
18861887 ) ;
18871888 assert ! ( added. contains( & "SETPCAP" ) , "missing SETPCAP" ) ;
1889+ assert ! ( added. contains( & "KILL" ) , "missing KILL" ) ;
18881890
18891891 // SETUID and SETGID are NOT in cap_add — they remain available from the
18901892 // default bounding set because we no longer use cap_drop:ALL. Verify they
@@ -1916,6 +1918,10 @@ mod tests {
19161918 !dropped. contains( & "SETPCAP" ) ,
19171919 "SETPCAP must not be dropped (needed for child bounding-set clear)"
19181920 ) ;
1921+ assert ! (
1922+ !dropped. contains( & "KILL" ) ,
1923+ "KILL must not be dropped (needed to signal the sandbox workload on shutdown)"
1924+ ) ;
19191925 assert ! (
19201926 !dropped. contains( & "ALL" ) ,
19211927 "must not use cap_drop:ALL in rootless Podman"
0 commit comments