File: 0010-Fix-glibc-2.40-crash.patch

package info (click to toggle)
nbdkit 1.42.9-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,696 kB
  • sloc: ansic: 59,224; sh: 16,793; makefile: 6,463; python: 1,837; cpp: 1,116; ml: 504; perl: 502; tcl: 62
file content (34 lines) | stat: -rw-r--r-- 1,314 bytes parent folder | download | duplicates (3)
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
Aurelien Jarno <aurel32@debian.org> writes:

I have tracked down the issue to two parts:

* nbdkit uses a version script with -rdynamic, which causes the
  _IO_stdin_used symbol from crt1.o to not be included in nbdkit binary.
  This is used by the GNU libc determine which version of the I/O
  functions should be used. Not exporting it means that the "old"
  version is used, leading to possible crashes or other issues on
  architectures that were supported by glibc 2.0. That is for debian:
  i386 and mips64el for official architectures and alpha, hppa, m68k,
  powerpc, sh4 and sparc64 for ports architecture.

* glibc 2.40 changed the format of the libio structures even more [1],
  increasing the incompatibilities.

Therefore I believe the problem has to be fixed on the nbdkit side, with
the following patch:

--- nbdkit-1.40.4.orig/server/nbdkit.syms
+++ nbdkit-1.40.4/server/nbdkit.syms
@@ -100,6 +100,12 @@
     # For AFL++ to work:
     __afl_*;
 
+    # The _IO_stdin_used symbol is used by the GNU libc determine which
+    # version of the I/O functions should be used. Not exporting it
+    # means that the "old" version is used, leading to crashes or other
+    # issues on architectures that were supported by glibc 2.0.
+    _IO_stdin_used;
+
   # Everything else is hidden.
   local: *;
 };