This is quite the dangerous bug for users that assume they are spawning processes with reduced privileges, but this will not be the case.
ProcessConfig::new is expected to return a config with no privileges, but, if the calling process does not itself have the privilege of creating configs, will simply return -1, indicating that privileges are inherited from the parent instead.
In my opinion ProcessConfig::new should return a Result<ProcessConfig, _>. Most process would simply expect this, in which case the missing privilege can simply be added, but no security hole is created.
This is quite the dangerous bug for users that assume they are spawning processes with reduced privileges, but this will not be the case.
ProcessConfig::new
is expected to return a config with no privileges, but, if the calling process does not itself have the privilege of creating configs, will simply return-1
, indicating that privileges are inherited from the parent instead.In my opinion
ProcessConfig::new
should return a Result<ProcessConfig, _>. Most process would simplyexpect
this, in which case the missing privilege can simply be added, but no security hole is created.