2024-05-27 13:23:04 -06:00
|
|
|
make SYS_fork non-fatal, musl uses it for fork(2)
|
|
|
|
|
2022-12-12 12:01:56 -07:00
|
|
|
--- a/security/sandbox/linux/SandboxFilter.cpp
|
|
|
|
+++ b/security/sandbox/linux/SandboxFilter.cpp
|
2024-05-27 13:23:04 -06:00
|
|
|
@@ -1253,6 +1253,10 @@
|
|
|
|
// usually do something reasonable on error.
|
2024-05-13 12:17:21 -06:00
|
|
|
case __NR_clone:
|
|
|
|
return ClonePolicy(Error(EPERM));
|
2024-05-27 13:23:04 -06:00
|
|
|
+#ifdef __NR_fork
|
2022-12-12 12:01:56 -07:00
|
|
|
+ case __NR_fork:
|
|
|
|
+ return Error(ENOSYS);
|
2024-05-27 13:23:04 -06:00
|
|
|
+#endif
|
|
|
|
|
2022-12-12 12:01:56 -07:00
|
|
|
# ifdef __NR_fadvise64
|
|
|
|
case __NR_fadvise64:
|
2024-05-27 13:23:04 -06:00
|
|
|
|
|
|
|
upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1657849
|
|
|
|
diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp
|
|
|
|
index ed958bc..9824433 100644
|
|
|
|
--- a/security/sandbox/linux/SandboxFilter.cpp
|
|
|
|
+++ b/security/sandbox/linux/SandboxFilter.cpp
|
|
|
|
@@ -1751,6 +1751,6 @@ class GMPSandboxPolicy : public SandboxPolicyCommon {
|
2022-12-12 12:01:56 -07:00
|
|
|
case __NR_sched_get_priority_max:
|
|
|
|
+ case __NR_sched_setscheduler:
|
|
|
|
return Allow();
|
|
|
|
case __NR_sched_getparam:
|
|
|
|
- case __NR_sched_getscheduler:
|
|
|
|
- case __NR_sched_setscheduler: {
|
|
|
|
+ case __NR_sched_getscheduler: {
|
|
|
|
Arg<pid_t> pid(0);
|
2024-05-27 13:23:04 -06:00
|
|
|
@@ -1926,3 +1926,2 @@ class RDDSandboxPolicy final : public SandboxPolicyCommon {
|
|
|
|
case __NR_sched_getscheduler:
|
|
|
|
- case __NR_sched_setscheduler:
|
|
|
|
case __NR_sched_getattr:
|
|
|
|
@@ -1932,2 +1931,5 @@ class RDDSandboxPolicy final : public SandboxPolicyCommon {
|
2022-12-12 12:01:56 -07:00
|
|
|
}
|
2024-05-27 13:23:04 -06:00
|
|
|
+ // sched_setscheduler gets special treatment here (bug 1657849):
|
|
|
|
+ case __NR_sched_setscheduler:
|
|
|
|
+ return Allow();
|
|
|
|
|
|
|
|
|