summaryrefslogtreecommitdiff
path: root/extra/chromium/chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407.patch
blob: 7766ad354e0c46cd0051d5797da90c54d4717237 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
diff -rauN chromium-81.0.4044.122/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
--- chromium-81.0.4044.122/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc	2020-04-21 23:50:38.000000000 +0200
+++ chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc	2020-04-24 08:23:49.283333424 +0200
@@ -148,7 +148,14 @@
     return Allow();
 #endif
 
-  if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) {
+  if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep
+#if defined(__NR_clock_gettime64)
+                                  || sysno == __NR_clock_gettime64
+#endif
+#if defined(__NR_clock_nanosleep_time64)
+                                  || sysno == __NR_clock_nanosleep_time64
+#endif
+  ) {
     return RestrictClockID();
   }
 
diff -rauN chromium-81.0.4044.122/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
--- chromium-81.0.4044.122/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc	2020-04-21 23:50:02.000000000 +0200
+++ chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc	2020-04-24 08:29:04.760000078 +0200
@@ -60,6 +60,12 @@
       case __NR_clock_gettime:
       case __NR_clock_getres:
       case __NR_clock_nanosleep:
+#if defined(__NR_clock_nanosleep_time64)
+      case __NR_clock_nanosleep_time64:
+#endif
+#if defined(__NR_clock_gettime64)
+      case __NR_clock_gettime64:
+#endif
         return RestrictClockID();
       default:
         return Allow();
diff -rauN chromium-81.0.4044.122/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
--- chromium-81.0.4044.122/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc	2020-04-21 23:50:02.000000000 +0200
+++ chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc	2020-04-24 08:32:50.016666736 +0200
@@ -39,6 +39,12 @@
                                 // filtered by RestrictClokID().
     case __NR_clock_gettime:    // Parameters filtered by RestrictClockID().
     case __NR_clock_nanosleep:  // Parameters filtered by RestrictClockID().
+#if defined(__NR_clock_gettime64)
+    case __NR_clock_gettime64:  // Parameters filtered by RestrictClockID().
+#endif
+#if defined(__NR_clock_nanosleep_time64)
+    case __NR_clock_nanosleep_time64:  // Parameters filtered by RestrictClockID().
+#endif
     case __NR_clock_settime:    // Privileged.
 #if defined(__i386__) || \
     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
diff -rauN chromium-81.0.4044.122/sandbox/linux/system_headers/arm_linux_syscalls.h chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/system_headers/arm_linux_syscalls.h
--- chromium-81.0.4044.122/sandbox/linux/system_headers/arm_linux_syscalls.h	2020-04-21 23:50:02.000000000 +0200
+++ chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/system_headers/arm_linux_syscalls.h	2020-04-24 08:35:06.950000054 +0200
@@ -1385,6 +1385,14 @@
 #define __NR_memfd_create (__NR_SYSCALL_BASE+385)
 #endif
 
+#if !defined(__NR_clock_gettime64)
+#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403)
+#endif
+
+#if !defined(__NR_clock_nanosleep_time64)
+#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407)
+#endif
+
 // ARM private syscalls.
 #if !defined(__ARM_NR_BASE)
 #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)
diff -rauN chromium-81.0.4044.122/sandbox/linux/system_headers/mips_linux_syscalls.h chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/system_headers/mips_linux_syscalls.h
--- chromium-81.0.4044.122/sandbox/linux/system_headers/mips_linux_syscalls.h	2020-04-21 23:50:02.000000000 +0200
+++ chromium-81.0.4044.122-Fix-sandbox-Aw-snap-for-syscalls-403-and-407-patch/sandbox/linux/system_headers/mips_linux_syscalls.h	2020-04-24 08:35:52.130000064 +0200
@@ -1433,4 +1433,12 @@
 #define __NR_memfd_create (__NR_Linux + 354)
 #endif
 
+#if !defined(__NR_clock_gettime64)
+#define __NR_clock_gettime64 (__NR_Linux + 403)
+#endif
+
+#if !defined(__NR_clock_nanosleep_time64)
+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407)
+#endif
+
 #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_