Skip to content

Commit

Permalink
container: bubblewrap runner: use --new-session to mitigate CVE-2017-…
Browse files Browse the repository at this point in the history
…5226

Without it, it is possible to escape the sandbox via TIOCSTI ioctls on the session
PTY.

Related: containers/bubblewrap#555
Related: containers/bubblewrap#142
Related: https://news.ycombinator.com/item?id=30825088
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
  • Loading branch information
kaniini committed Mar 14, 2023
1 parent 404f01b commit 07cd62e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/container/bubblewrap_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ func (bw *BWRunner) Run(cfg *Config, args ...string) error {
"--dev", "/dev",
"--proc", "/proc",
"--chdir", "/home/build",
"--clearenv")
"--clearenv",
"--new-session")

if !cfg.Capabilities.Networking {
baseargs = append(baseargs, "--unshare-net")
Expand Down

0 comments on commit 07cd62e

Please sign in to comment.