Skip to content

Commit

Permalink
Merge 0077ad1 into a57028b
Browse files Browse the repository at this point in the history
  • Loading branch information
gotlougit committed Sep 28, 2023
2 parents a57028b + 0077ad1 commit 2f1b34c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/builtins/danger_zone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,25 @@ impl RuleSet for ForkAndExec {
"ForkAndExec"
}
}

/// [`Pipes`] is in the danger zone because it can be used create a pipe for IPC.
///
/// # Security Considerations
/// You can, for example, create the pipe, fork the process, and then the parent
/// and the child both have the pipe but even if you apply seccomp to the parent,
/// it doesn't apply to the already-forked child
/// (unless you use [`apply_to_all_threads`] of course)
pub struct Pipes;
impl RuleSet for Pipes {
fn simple_rules(&self) -> Vec<Sysno> {
vec![Sysno::pipe, Sysno::pipe2]
}

fn conditional_rules(&self) -> HashMap<Sysno, Vec<SeccompRule>> {
HashMap::new()
}

fn name(&self) -> &'static str {
"Pipes"
}
}

0 comments on commit 2f1b34c

Please sign in to comment.