Bug#873708: libsystemd-shared: symbol collisions
Johan Carlquist
jocar at su.se
Wed Aug 30 09:43:13 BST 2017
Package: systemd
Version: 232-25+deb9u1
Severity: important
Dear Maintainer,
systemd is segfaulting in libsystemd-shared when combined with
heimdal(heimdal-clients and libpam-heimdal) due of symbol collisions.
>From `dmesq` when a user is logging in:
```
[ 4.695291] (systemd)[1059]: segfault at 7f711ea16b8e ip 00007f7123d107f8 sp 00007ffd36ff05f0 error 7 in libsystemd-shared-232.so[7f7123c02000+192000]
```
This has been fixed upstream for future releases:
* https://github.com/systemd/systemd/issues/6624
* https://github.com/systemd/systemd/pull/6669
Since the potential for collisions is high I backported their patch to
apply to strech as well:
```
diff -Nru systemd-232/debian/changelog systemd-232/debian/changelog
--- systemd-232/debian/changelog 2017-07-05 22:31:25.000000000 +0200
+++ systemd-232/debian/changelog 2017-08-29 14:54:14.000000000 +0200
@@ -1,3 +1,10 @@
+systemd (232-25+deb9u1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Prevent symbol collisions with other programs and libraries.
+
+ -- Johan Carlquist <jocar at su.se> Tue, 29 Aug 2017 14:54:14 +0200
+
systemd (232-25+deb9u1) stretch; urgency=medium
[ Dimitri John Ledkov ]
diff -Nru systemd-232/debian/patches/libsystemd-shared-version-script.patch systemd-232/debian/patches/libsystemd-shared-version-script.patch
--- systemd-232/debian/patches/libsystemd-shared-version-script.patch 1970-01-01 01:00:00.000000000 +0100
+++ systemd-232/debian/patches/libsystemd-shared-version-script.patch 2017-08-29 14:54:06.000000000 +0200
@@ -0,0 +1,21 @@
+Index: systemd-232/Makefile.am
+===================================================================
+--- systemd-232.orig/Makefile.am
++++ systemd-232/Makefile.am
+@@ -1121,6 +1121,8 @@ libsystemd_shared_la_LIBADD = \
+
+ libsystemd_shared_la_LDFLAGS = \
+ $(AM_LDFLAGS) \
++ -shared \
++ -Wl,--version-script=$(top_srcdir)/src/shared/libshared.sym \
+ -release $(PACKAGE_VERSION)
+
+
+Index: systemd-232/src/shared/libshared.sym
+===================================================================
+--- /dev/null
++++ systemd-232/src/shared/libshared.sym
+@@ -0,0 +1,3 @@
++SD_SHARED {
++ global: *;
++};
diff -Nru systemd-232/debian/patches/series systemd-232/debian/patches/series
--- systemd-232/debian/patches/series 2017-07-05 22:31:25.000000000 +0200
+++ systemd-232/debian/patches/series 2017-08-29 14:52:37.000000000 +0200
@@ -97,3 +97,4 @@
debian/Let-graphical-session-pre.target-be-manually-started.patch
debian/Add-env-variable-for-machine-ID-path.patch
cryptsetup-generator-run-cryptsetup-service-before-swap-u.patch
+libsystemd-shared-version-script.patch
```
Before patch:
```
# readelf --syms /lib/systemd/libsystemd-shared-232.so | grep parse_time
546: 0000000000110430 2646 FUNC GLOBAL DEFAULT 12 parse_timestamp
1454: 000000000010e4d0 828 FUNC GLOBAL DEFAULT 12 parse_time
```
After patch:
```
# readelf --syms /lib/systemd/libsystemd-shared-232.so | grep parse_time
546: 00000000001104d0 2646 FUNC GLOBAL DEFAULT 12 parse_timestamp@@SD_SHARED
1456: 000000000010e570 828 FUNC GLOBAL DEFAULT 12 parse_time@@SD_SHARED
```
(and no segfault)
The patch works just fine on my machine and I hope it could be merged in
to stretch-updates.
--
jocar
-- Package-specific info:
-- System Information:
Debian Release: 9.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages systemd depends on:
ii adduser 3.115
ii libacl1 2.2.52-3+b1
ii libapparmor1 2.11.0-3
ii libaudit1 1:2.6.7-2
ii libblkid1 2.29.2-1
ii libc6 2.24-11+deb9u1
ii libcap2 1:2.25-1
ii libcryptsetup4 2:1.7.3-4
ii libgcrypt20 1.7.6-2+deb9u2
ii libgpg-error0 1.26-2
ii libidn11 1.33-1
ii libip4tc0 1.6.0+snapshot20161117-6
ii libkmod2 23-2
ii liblz4-1 0.0~r131-2+b1
ii liblzma5 5.2.2-1.2+b1
ii libmount1 2.29.2-1
ii libpam0g 1.1.8-3.6
ii libseccomp2 2.3.1-2.1
ii libselinux1 2.6-3+b1
ii libsystemd0 232-25+deb9u1
ii mount 2.29.2-1
ii procps 2:3.3.12-3
ii util-linux 2.29.2-1
Versions of packages systemd recommends:
ii dbus 1.10.18-1
ii libpam-systemd 232-25+deb9u1
Versions of packages systemd suggests:
pn policykit-1 <none>
pn systemd-container <none>
pn systemd-ui <none>
Versions of packages systemd is related to:
pn dracut <none>
ii initramfs-tools 0.130
ii udev 232-25+deb9u1
-- no debconf information
More information about the Pkg-systemd-maintainers
mailing list