forked from pool/libqt5-qtwebengine
Fabian Vogt
39d334cf82
Qt WebEngine 5.15.6 OBS-URL: https://build.opensuse.org/request/show/917830 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.15/libqt5-qtwebengine?expand=0&rev=32
43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
From 218438259dd795456f0a48f67cbe5b4e520db88b Mon Sep 17 00:00:00 2001
|
|
From: Matthew Denton <mpdenton@chromium.org>
|
|
Date: Thu, 3 Jun 2021 20:06:13 +0000
|
|
Subject: [PATCH] Linux sandbox: return ENOSYS for clone3
|
|
|
|
Because clone3 uses a pointer argument rather than a flags argument, we
|
|
cannot examine the contents with seccomp, which is essential to
|
|
preventing sandboxed processes from starting other processes. So, we
|
|
won't be able to support clone3 in Chromium. This CL modifies the
|
|
BPF policy to return ENOSYS for clone3 so glibc always uses the fallback
|
|
to clone.
|
|
|
|
Bug: 1213452
|
|
Change-Id: I7c7c585a319e0264eac5b1ebee1a45be2d782303
|
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2936184
|
|
Reviewed-by: Robert Sesek <rsesek@chromium.org>
|
|
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
|
|
Cr-Commit-Position: refs/heads/master@{#888980}
|
|
---
|
|
.../sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc | 8 ++++++++
|
|
|
|
diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
|
index 3c67b124786..81cb25e139e 100644
|
|
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
|
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
|
@@ -165,6 +165,14 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno,
|
|
return RestrictCloneToThreadsAndEPERMFork();
|
|
}
|
|
|
|
+ // clone3 takes a pointer argument which we cannot examine, so return ENOSYS
|
|
+ // to force the libc to use clone. See https://crbug.com/1213452.
|
|
+ #if defined(__NR_clone3)
|
|
+ if (sysno == __NR_clone3) {
|
|
+ return Error(ENOSYS);
|
|
+ }
|
|
+ #endif
|
|
+
|
|
if (sysno == __NR_fcntl)
|
|
return RestrictFcntlCommands();
|
|
|
|
--
|
|
2.32.0
|