# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/firefox/hotfix-sandbox-sched_setscheduler.patch.musl # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- 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 { 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(0); @@ -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 { } + // sched_setscheduler gets special treatment here (bug 1657849): + case __NR_sched_setscheduler: + return Allow();