Bug 1413312 - Fix media plugin sandbox policy for sched_get_priority_{min,max}. r?gcp draft
authorJed Davis <jld@mozilla.com>
Tue, 31 Oct 2017 18:12:43 -0600
changeset 691833 56ee77aab8b0377bb2a9f2c1dc3d7f8efd915c3f
parent 691832 4e77aeefbb8c165ba58ebbd1c7762b5128df0f83
child 738589 a14e37683983233912dd44df8e4fd5ab7f4b0a20
push id87318
push userbmo:jld@mozilla.com
push dateThu, 02 Nov 2017 03:13:11 +0000
reviewersgcp
bugs1413312
milestone58.0a1
Bug 1413312 - Fix media plugin sandbox policy for sched_get_priority_{min,max}. r?gcp MozReview-Commit-ID: Bz4EWU13HAJ
security/sandbox/linux/SandboxFilter.cpp
--- a/security/sandbox/linux/SandboxFilter.cpp
+++ b/security/sandbox/linux/SandboxFilter.cpp
@@ -1132,20 +1132,21 @@ public:
 #ifdef MOZ_ASAN
         .ElseIf(advice == MADV_DONTDUMP, Allow())
 #endif
         .Else(InvalidSyscall());
     }
     case __NR_brk:
     CASES_FOR_geteuid:
       return Allow();
+    case __NR_sched_get_priority_min:
+    case __NR_sched_get_priority_max:
+      return Allow();
     case __NR_sched_getparam:
     case __NR_sched_getscheduler:
-    case __NR_sched_get_priority_min:
-    case __NR_sched_get_priority_max:
     case __NR_sched_setscheduler: {
       Arg<pid_t> pid(0);
       return If(pid == 0, Allow())
         .Else(Trap(SchedTrap, nullptr));
     }
 
     // For clock(3) on older glibcs; bug 1304220.
     case __NR_times: