From 5e4cd6c4ee7ac5db533f0278a1787ad6a7148405 Mon Sep 17 00:00:00 2001 From: csagan5 <32685696+csagan5@users.noreply.github.com> Date: Sat, 16 Apr 2022 16:59:48 +0200 Subject: [PATCH] Add temptative patch for mremap removal --- ...-mremap-from-seccomp-baseline-policy.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 build/patches/Remove-mremap-from-seccomp-baseline-policy.patch diff --git a/build/patches/Remove-mremap-from-seccomp-baseline-policy.patch b/build/patches/Remove-mremap-from-seccomp-baseline-policy.patch new file mode 100644 index 00000000..d486fe71 --- /dev/null +++ b/build/patches/Remove-mremap-from-seccomp-baseline-policy.patch @@ -0,0 +1,24 @@ +From: csagan5 <32685696+csagan5@users.noreply.github.com> +Date: Sat, 16 Apr 2022 10:14:28 +0200 +Subject: Remove mremap from seccomp baseline policy + +See also: +* https://bugs.chromium.org/p/chromium/issues/detail?id=1288042 +* https://docs.hexavalent.org/sandboxing/mremap.html +--- + sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc +--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc ++++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc +@@ -98,7 +98,6 @@ ResultExpr BaselinePolicyAndroid::EvaluateSyscall(int sysno) const { + case __NR_getpriority: + case __NR_ioctl: + case __NR_membarrier: // https://crbug.com/966433 +- case __NR_mremap: + #if defined(__i386__) + // Used on pre-N to initialize threads in ART. + case __NR_modify_ldt: +-- +2.25.1