[Pkg-privacy-commits] [Git][pkg-privacy-team/torsocks][master] 5 commits: New patch: fix Totem crashing when run under torsocks, by adding support for...
intrigeri
intrigeri at debian.org
Fri Apr 5 09:35:52 BST 2019
intrigeri pushed to branch master at Privacy Maintainers / torsocks
Commits:
821dd7f4 by intrigeri at 2019-04-03T18:14:00Z
New patch: fix Totem crashing when run under torsocks, by adding support for getdents and getdents64.
Bug-Tails: https://redmine.tails.boum.org/code/issues/16618
- - - - -
afee64fe by intrigeri at 2019-04-03T18:15:30Z
torsocks (2.3.0-1.0tails1)
Git-Dch: Ignore
- - - - -
eb5baa1e by intrigeri at 2019-04-03T18:36:05Z
New patch: fix Totem crashing when run under torsocks, by adding support for getdents and getdents64.
Bug: https://trac.torproject.org/projects/tor/ticket/28861
Bug-Tails: https://redmine.tails.boum.org/code/issues/16618
- - - - -
afd14e36 by intrigeri at 2019-04-03T18:39:13Z
torsocks (2.3.0-1.0tails2)
Git-Dch: Ignore
- - - - -
2f8d65d2 by intrigeri at 2019-04-03T18:47:22Z
torsocks (2.3.0-2)
Git-Dch: Ignore
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/Add-getdents-getdents64-support.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,9 +1,16 @@
-torsocks (2.3.0-2) UNRELEASED; urgency=medium
+torsocks (2.3.0-2) unstable; urgency=medium
- * debian/control:
- - Update package description. (Closes: #870763.)
+ [ intrigeri & Sandro Knauß ]
+ * Cherry-pick patch from upstream Git, to fix Totem crashing when run
+ under torsocks, by adding support for the getdents and getdents64
+ syscalls. (Closes: Tails#16618, which would be severity: important
+ in a Debian context.)
+
+ [ Ulrike Uhlig ]
+ * Update package description: don't make safety promises that upstream
+ prefers not to. (Closes: #870763)
- -- Ulrike Uhlig <ulrike at debian.org> Tue, 27 Nov 2018 16:28:14 +0100
+ -- intrigeri <intrigeri at debian.org> Wed, 03 Apr 2019 18:14:40 +0000
torsocks (2.3.0-1) unstable; urgency=medium
=====================================
debian/patches/Add-getdents-getdents64-support.patch
=====================================
@@ -0,0 +1,95 @@
+From: Alejandro Alvarado <44826516+seisvelas at users.noreply.github.com>
+Date: Mon, 17 Dec 2018 19:25:18 -0600
+Subject: Add getdents / getdents64 support
+
+This fixes Totem, which otherwise crashes when under torsocks in
+some configurations.
+
+Bug: https://trac.torproject.org/projects/tor/ticket/28861
+Bug-Tails: https://redmine.tails.boum.org/code/issues/16618
+---
+ src/common/compat.h | 8 ++++++++
+ src/lib/syscall.c | 37 +++++++++++++++++++++++++++++++++++++
+ 2 files changed, 45 insertions(+)
+
+diff --git a/src/common/compat.h b/src/common/compat.h
+index a9b73c2..d79301f 100644
+--- a/src/common/compat.h
++++ b/src/common/compat.h
+@@ -129,6 +129,12 @@ void tsocks_once(tsocks_once_t *o, void (*init_routine)(void));
+ #ifndef __NR_memfd_create
+ #define __NR_memfd_create -19
+ #endif
++#ifndef __NR_getdents
++#define __NR_getdents -20
++#endif
++#ifndef __NR_getdents64
++#define __NR_getdents64 -21
++#endif
+
+ #define TSOCKS_NR_SOCKET __NR_socket
+ #define TSOCKS_NR_CONNECT __NR_connect
+@@ -149,6 +155,8 @@ void tsocks_once(tsocks_once_t *o, void (*init_routine)(void));
+ #define TSOCKS_NR_CLOCK_GETTIME __NR_clock_gettime
+ #define TSOCKS_NR_FORK __NR_fork
+ #define TSOCKS_NR_MEMFD_CREATE __NR_memfd_create
++#define TSOCKS_NR_GETDENTS __NR_getdents
++#define TSOCKS_NR_GETDENTS64 __NR_getdents64
+
+ /*
+ * Despite glibc providing wrappers for these calls for a long time
+diff --git a/src/lib/syscall.c b/src/lib/syscall.c
+index 7fba580..f793da7 100644
+--- a/src/lib/syscall.c
++++ b/src/lib/syscall.c
+@@ -437,6 +437,37 @@ static LIBC_SYSCALL_RET_TYPE handle_memfd_create(va_list args)
+
+ return tsocks_libc_syscall(TSOCKS_NR_MEMFD_CREATE, name, flags);
+ }
++/*
++ * Handle getdents(2) syscall.
++ */
++static LIBC_SYSCALL_RET_TYPE handle_getdents(va_list args)
++{
++ unsigned int fd;
++ struct linux_dirent *dirp;
++ unsigned int count;
++
++ fd = va_arg(args, __typeof__(fd));
++ dirp = va_arg(args, __typeof__(dirp));
++ count = va_arg(args, __typeof__(count));
++
++ return tsocks_libc_syscall(TSOCKS_NR_GETDENTS, fd, dirp, count);
++}
++/*
++ * Handle getdents64(2) syscall.
++ */
++static LIBC_SYSCALL_RET_TYPE handle_getdents64(va_list args)
++{
++ unsigned int fd;
++ struct linux_dirent64 *dirp;
++ unsigned int count;
++
++ fd = va_arg(args, __typeof__(fd));
++ dirp = va_arg(args, __typeof__(dirp));
++ count = va_arg(args, __typeof__(count));
++
++ return tsocks_libc_syscall(TSOCKS_NR_GETDENTS64, fd, dirp, count);
++}
++
+ #endif /* __linux__ */
+
+ /*
+@@ -558,6 +589,12 @@ LIBC_SYSCALL_RET_TYPE tsocks_syscall(long int number, va_list args)
+ case TSOCKS_NR_MEMFD_CREATE:
+ ret = handle_memfd_create(args);
+ break;
++ case TSOCKS_NR_GETDENTS:
++ ret = handle_getdents(args);
++ break;
++ case TSOCKS_NR_GETDENTS64:
++ ret = handle_getdents64(args);
++ break;
+ #endif /* __linux__ */
+ default:
+ /*
=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
exclude_test_requiring_network.patch
+Add-getdents-getdents64-support.patch
View it on GitLab: https://salsa.debian.org/pkg-privacy-team/torsocks/compare/6bc678c9e97efd5d5c700eb35feff3f3e7cc0e08...2f8d65d29d3a7e67090bd111a26372a707469485
--
View it on GitLab: https://salsa.debian.org/pkg-privacy-team/torsocks/compare/6bc678c9e97efd5d5c700eb35feff3f3e7cc0e08...2f8d65d29d3a7e67090bd111a26372a707469485
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-privacy-commits/attachments/20190405/281220de/attachment-0001.html>
More information about the Pkg-privacy-commits
mailing list