|
| 1 | +upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1657849 |
| 2 | +diff --git a/security/sandbox/linux/SandboxFilter.cpp b/security/sandbox/linux/SandboxFilter.cpp |
| 3 | +index ed958bc..9824433 100644 |
| 4 | +--- firefox-142.0.1/security/sandbox/linux/SandboxFilter.cpp 2025-08-27 05:19:55.000000000 +0200 |
| 5 | ++++ - 2025-08-27 13:34:45.154107444 +0200 |
| 6 | +@@ -1884,10 +1884,16 @@ |
| 7 | + return Allow(); |
| 8 | + case __NR_sched_get_priority_min: |
| 9 | + case __NR_sched_get_priority_max: |
| 10 | ++#ifndef __GLIBC__ |
| 11 | ++ case __NR_sched_setscheduler: |
| 12 | ++#endif |
| 13 | + return Allow(); |
| 14 | + case __NR_sched_getparam: |
| 15 | + case __NR_sched_getscheduler: |
| 16 | +- case __NR_sched_setscheduler: { |
| 17 | ++#ifdef __GLIBC__ |
| 18 | ++ case __NR_sched_setscheduler: |
| 19 | ++#endif |
| 20 | ++ { |
| 21 | + Arg<pid_t> pid(0); |
| 22 | + return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr)); |
| 23 | + } |
| 24 | +@@ -2077,13 +2083,21 @@ |
| 25 | + case __NR_sched_getparam: |
| 26 | + case __NR_sched_setparam: |
| 27 | + case __NR_sched_getscheduler: |
| 28 | ++#ifdef __GLIBC__ |
| 29 | + case __NR_sched_setscheduler: |
| 30 | ++#endif |
| 31 | + case __NR_sched_getattr: |
| 32 | + case __NR_sched_setattr: { |
| 33 | + Arg<pid_t> pid(0); |
| 34 | + return If(pid == 0, Allow()).Else(Trap(SchedTrap, nullptr)); |
| 35 | + } |
| 36 | + |
| 37 | ++#ifndef __GLIBC__ |
| 38 | ++ // sched_setscheduler gets special treatment here (bug 1657849): |
| 39 | ++ case __NR_sched_setscheduler: |
| 40 | ++ return Allow(); |
| 41 | ++#endif |
| 42 | ++ |
| 43 | + // The priority bounds are also used, sometimes (bug 1838675): |
| 44 | + case __NR_sched_get_priority_min: |
| 45 | + case __NR_sched_get_priority_max: |
0 commit comments