Browse Source

Update to 88.0.4324.182-1

tags/90.0.4430.93-1
wchen342 2 months ago
parent
commit
35042dc6db
Signed by: wchen342 GPG Key ID: 9C19365D69B04CEC
3 changed files with 153 additions and 5 deletions
  1. +141
    -0
      chromium-88.0.4324.96-fstatfix.patch
  2. +3
    -3
      sources
  3. +9
    -2
      ungoogled-chromium.spec

+ 141
- 0
chromium-88.0.4324.96-fstatfix.patch View File

@ -0,0 +1,141 @@
diff -up chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.fstatfix chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
--- chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.fstatfix 2021-01-25 10:11:45.427436398 -0500
+++ chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-01-25 10:12:51.337699003 -0500
@@ -257,6 +257,18 @@ ResultExpr EvaluateSyscallImpl(int fs_de
return RestrictKillTarget(current_pid, sysno);
}
+#if defined(__NR_newfstatat)
+ if (sysno == __NR_newfstatat) {
+ return RewriteFstatatSIGSYS();
+ }
+#endif
+
+#if defined(__NR_fstatat64)
+ if (sysno == __NR_fstatat64) {
+ return RewriteFstatatSIGSYS();
+ }
+#endif
+
if (SyscallSets::IsFileSystem(sysno) ||
SyscallSets::IsCurrentDirectory(sysno)) {
return Error(fs_denied_errno);
diff -up chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc.fstatfix chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
--- chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc.fstatfix 2021-01-25 10:13:10.179774081 -0500
+++ chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc 2021-01-25 10:16:18.790525746 -0500
@@ -6,6 +6,8 @@
#include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h"
+#include <errno.h>
+#include <fcntl.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
@@ -355,6 +357,35 @@ intptr_t SIGSYSSchedHandler(const struct
return -ENOSYS;
}
+intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args,
+ void* aux) {
+ switch (args.nr) {
+#if defined(__NR_newfstatat)
+ case __NR_newfstatat:
+#endif
+#if defined(__NR_fstatat64)
+ case __NR_fstatat64:
+#endif
+#if defined(__NR_newfstatat) || defined(__NR_fstatat64)
+ if (*reinterpret_cast<const char *>(args.args[1]) == '\0'
+ && args.args[3] == static_cast<uint64_t>(AT_EMPTY_PATH)) {
+ return sandbox::sys_fstat64(static_cast<int>(args.args[0]),
+ reinterpret_cast<struct stat64 *>(args.args[2]));
+ } else {
+ errno = EACCES;
+ return -1;
+ }
+ break;
+#endif
+ }
+
+ CrashSIGSYS_Handler(args, aux);
+
+ // Should never be reached.
+ RAW_CHECK(false);
+ return -ENOSYS;
+}
+
bpf_dsl::ResultExpr CrashSIGSYS() {
return bpf_dsl::Trap(CrashSIGSYS_Handler, NULL);
}
@@ -387,6 +418,10 @@ bpf_dsl::ResultExpr RewriteSchedSIGSYS()
return bpf_dsl::Trap(SIGSYSSchedHandler, NULL);
}
+bpf_dsl::ResultExpr RewriteFstatatSIGSYS() {
+ return bpf_dsl::Trap(SIGSYSFstatatHandler, NULL);
+}
+
void AllocateCrashKeys() {
#if !defined(OS_NACL_NONSFI)
if (seccomp_crash_key)
diff -up chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h.fstatfix chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h
--- chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h.fstatfix 2021-01-25 10:16:36.982598236 -0500
+++ chromium-88.0.4324.96/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h 2021-01-25 10:18:45.705111027 -0500
@@ -62,6 +62,10 @@ SANDBOX_EXPORT intptr_t SIGSYSPtraceFail
// sched_setparam(), sched_setscheduler()
SANDBOX_EXPORT intptr_t SIGSYSSchedHandler(const arch_seccomp_data& args,
void* aux);
+// If the fstatat syscall is actually a disguised fstat, calls the regular fstat
+// syscall, otherwise, crashes in the same way as CrashSIGSYS_Handler.
+SANDBOX_EXPORT intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args,
+ void* aux);
// Variants of the above functions for use with bpf_dsl.
SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYS();
@@ -72,6 +76,7 @@ SANDBOX_EXPORT bpf_dsl::ResultExpr Crash
SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSFutex();
SANDBOX_EXPORT bpf_dsl::ResultExpr CrashSIGSYSPtrace();
SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteSchedSIGSYS();
+SANDBOX_EXPORT bpf_dsl::ResultExpr RewriteFstatatSIGSYS();
// Allocates a crash key so that Seccomp information can be recorded.
void AllocateCrashKeys();
diff -up chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.cc.fstatfix chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.cc
--- chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.cc.fstatfix 2021-01-25 10:18:53.307141311 -0500
+++ chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.cc 2021-01-25 10:19:46.982355293 -0500
@@ -261,4 +261,13 @@ int sys_sigaction(int signum,
#endif // defined(MEMORY_SANITIZER)
+SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf)
+{
+#if defined(__NR_fstat64)
+ return syscall(__NR_fstat64, fd, buf);
+#else
+ return syscall(__NR_fstat, fd, buf);
+#endif
+}
+
} // namespace sandbox
diff -up chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.h.fstatfix chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.h
--- chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.h.fstatfix 2021-01-25 10:19:53.115379741 -0500
+++ chromium-88.0.4324.96/sandbox/linux/services/syscall_wrappers.h 2021-01-25 10:20:45.485588421 -0500
@@ -17,6 +17,7 @@ struct sock_fprog;
struct rlimit64;
struct cap_hdr;
struct cap_data;
+struct stat64;
namespace sandbox {
@@ -84,6 +85,9 @@ SANDBOX_EXPORT int sys_sigaction(int sig
const struct sigaction* act,
struct sigaction* oldact);
+// Recent glibc rewrites fstat to fstatat.
+SANDBOX_EXPORT int sys_fstat64(int fd, struct stat64 *buf);
+
} // namespace sandbox
#endif // SANDBOX_LINUX_SERVICES_SYSCALL_WRAPPERS_H_

+ 3
- 3
sources View File

@ -19,6 +19,6 @@ SHA512 (NotoSansSymbols2-Regular.ttf) = 8889d356da290fb4a75584db238a874eaea41c7e
SHA512 (NotoSansTibetan-Regular.ttf) = 7256b3219b0607e86d58661dd382a1429babc412b82a4fce659b2db41cd8ebd9d7183c9dddd55b5deae45140627951698edbc7f6b5d36cd486e23c1886a98971
SHA512 (node-v10.15.3-linux-x64.tar.gz) = 5eb544ef706562981340a82acc79e2162c6a3e4049b4a95f69ce353ee5b0f929c60b1fc457e8249b3fb0696f82fc28c5f543f5947db19fae4e9d5c21b906bb20
SHA512 (xcb-proto-1.14.tar.xz) = de66d568163b6da2be9d6c59984f3afa3acd119a781378638045fd68018665ef5c9af98f024e9962ba3eb7c7a4d85c27ba70ffafceb2324ccc6940f34de16690
SHA512 (depot_tools.git-master.tar.gz) = 0040332b90b22f82a1e23614918fee996cb9f70478a347fa623f34ca502edc84a966294202563ef939f47407a5f72b234453962bffb7f13f3b44089ceffd538f
SHA512 (chromium-88.0.4324.150-clean.tar.xz) = 5c13d5a3352be9151b13dbcca9e0124abd1924289398a36c1a3a1a0da0c6bfb9a02c1385e19f745b54e5abf771babca273c7eeff9ce0fd1fd8e37c4f74472672
SHA512 (ungoogled-chromium-88.0.4324.146-1.tar.gz) = b8c4ea1d26f092ba02ff099ddda5423215b4ebb607faebdbf195b1ff93dd72c41edb4bc46d90288f3fa84b4497faa976c5daef69f84b0381c8179475650b2336
SHA512 (depot_tools.git-master.tar.gz) = 76770b7ca72a68df1e00fe057087afbfabb8e025ce0e55892d73fa26bc357e6b6f85b303e8d814370c10ddfcd48a2bc614576cfa5883156d7e7edc3fe2492f1f
SHA512 (chromium-88.0.4324.182-clean.tar.xz) = 954fdaa9b7ee60bb37deb9fcee7f7553e4a0afcf11c1dcb188b6042c370098383d1b4bec0326cad0bea9a59982b42a7691d8aee0961f9658ed906eeee60a05e0
SHA512 (ungoogled-chromium-88.0.4324.182-1.tar.gz) = f591fbe81a45a9e58b367e395475ba2b7bc3be0d46ddb6072fd775ef09bf848e069e836b372bfb5ac5c4255c614270400be129aa049ad9ef8237800ba5b8c852

+ 9
- 2
ungoogled-chromium.spec View File

@ -168,7 +168,7 @@ Name: ungoogled-chromium%{nsuffix}
%else
Name: ungoogled-chromium
%endif
Version: %{majorversion}.0.4324.150
Version: %{majorversion}.0.4324.182
Release: 1%{?dist}.%{revision}
%if %{?freeworld}
# chromium-freeworld
@ -255,6 +255,9 @@ Patch72: chromium-88-federated_learning-include.patch
Patch73: chromium-88-ityp-include.patch
# https://github.com/stha09/chromium-patches/blob/master/chromium-88-StringPool-include.patch
Patch74: chromium-88-StringPool-include.patch
# Fix sandbox code to properly handle the new way that glibc handles fstat in Fedora 34+
# Thanks to Kevin Kofler for the fix.
Patch75: chromium-88.0.4324.96-fstatfix.patch
# Use lstdc++ on EPEL7 only
Patch101: chromium-75.0.3770.100-epel7-stdc++.patch
@ -340,7 +343,7 @@ Source20: https://www.x.org/releases/individual/proto/xcb-proto-1.14.tar.xz
Source21: %{name}.appdata.xml
# ungoogled-chromium source
%global ungoogled_chromium_revision 88.0.4324.146-1
%global ungoogled_chromium_revision 88.0.4324.182-1
Source300: https://github.com/Eloston/ungoogled-chromium/archive/%{ungoogled_chromium_revision}/ungoogled-chromium-%{ungoogled_chromium_revision}.tar.gz
# We can assume gcc and binutils.
@ -683,6 +686,7 @@ Requires: minizip%{_isa}
%patch72 -p1 -b .federated_learning-include
%patch73 -p1 -b .ityp-include
%patch74 -p1 -b .StringPool-include
%patch75 -p1 -b .fstatfix
# EPEL specific patches
%if 0%{?rhel} == 7
@ -1484,6 +1488,9 @@ fi
%endif
%changelog
* Fri Feb 19 2021 wchen342 <[email protected]> - 88.0.4324.182-1
- Update Chromium to 88.0.4234.182
* Fri Feb 05 2021 wchen342 <[email protected]> - 88.0.4324.150-1
- Update Chromium to 88.0.4324.150


Loading…
Cancel
Save