Fix sandbox issue on 32-bit architectures with glibc >= 2.31 (from Debian)

* Sat Jan 23 2021 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.15.2-7
- Fix sandbox issue on 32-bit architectures with glibc >= 2.31 (from Debian)

Unlike the other sandbox fix, this one also affects stable Fedora
releases, but it affects only 32-bit architectures such as armv7hl or
the i386 multilib, not 64-bit architectures such as x86_64 or aarch64.
epel9
Kevin Kofler 4 years ago
parent 393d059f13
commit 8f7f959da3

@ -53,7 +53,7 @@
Summary: Qt5 - QtWebEngine components
Name: qt5-qtwebengine
Version: 5.15.2
Release: 6%{?dist}
Release: 7%{?dist}
# See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details
# See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html
@ -101,8 +101,10 @@ Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch
Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch
# Missing #includes for gcc-11
Patch27: qtwebengine-gcc11.patch
# Fix sandbox issue breaking text rendering with glibc 2.33 (#1904652)
# Fix sandbox issue breaking text rendering with glibc >= 2.33 (#1904652)
Patch28: qtwebengine-everywhere-src-5.15.2-#1904652.patch
# Fix sandbox issue on 32-bit architectures with glibc >= 2.31 (from Debian)
Patch29: qtwebengine-everywhere-src-5.15.2-sandbox-time64-syscalls.patch
## Upstream patches:
@ -406,6 +408,7 @@ popd
%patch26 -p1 -b .use-python2
%patch27 -p1 -b .gcc11
%patch28 -p1 -b .rh#1904652
%patch29 -p1 -b .sandbox-time64-syscalls
# the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references
# when building on older Qt releases
@ -636,6 +639,9 @@ done
%changelog
* Sat Jan 23 2021 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.15.2-7
- Fix sandbox issue on 32-bit architectures with glibc >= 2.31 (from Debian)
* Sat Jan 23 2021 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.15.2-6
- Reenable system ICU on F33+, ICU 67 supported since 5.15.1 according to Debian

@ -0,0 +1,89 @@
Description: fix seccomp-bpf failures in syscalls 0403, 0407
glibc ≥ 2.31 uses these syscalls on 32-bit platforms:
.
- https://sourceware.org/git/?p=glibc.git;a=commit;h=2e44b10b42d68d98
- https://sourceware.org/git/?p=glibc.git;a=commit;h=ec138c67cbda8b58
Author: Andreas Müller <schnitzeltony@gmail.com>
Forwarded: no
Last-Update: 2020-09-02
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
@@ -148,7 +148,14 @@ ResultExpr EvaluateSyscallImpl(int fs_de
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();
}
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
@@ -60,6 +60,12 @@ class RestrictClockIdPolicy : public bpf
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();
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -39,6 +39,12 @@ bool SyscallSets::IsAllowedGettime(int s
// 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))
--- a/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
+++ b/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
@@ -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)
--- a/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h
+++ b/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h
@@ -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_
Loading…
Cancel
Save