network-manager built against glibc-2.26 requires GLIBC_2.25 symbol yet doesn't depend on recent enough glibc

Bug #1715641 reported by Dimitri John Ledkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
binutils
Fix Released
Medium
binutils (Ubuntu)
Fix Released
Undecided
Unassigned
debhelper (Ubuntu)
Invalid
Undecided
Unassigned
dpkg (Debian)
Fix Released
Unknown
dpkg (Ubuntu)
Invalid
Undecided
Unassigned
glibc (Ubuntu)
Invalid
Undecided
Unassigned
network-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

network-manager built against glibc-2.26 requires GLIBC_2.25 symbol yet doesn't depend on recent enough glibc

# cat debian/network-manager.substvars
misc:Breaks=ppp (<< 2.4.7-1+~), ppp (>= 2.4.7-2~)
misc:Depends=init-system-helpers (>= 1.18~)
misc:Pre-Depends=
shlibs:Depends=libaudit1 (>= 1:2.2.1), libbluetooth3 (>= 4.91), libc6 (>= 2.17), libcurl3-gnutls (>= 7.16.3), libglib2.0-0 (>= 2.43.2), libgnutls30 (>= 3.5.0), libjansson4 (>= 2.0.1), libmm-glib0 (>= 1.0.0), libndp0 (>= 1.2), libnewt0.52, libnl-3-200 (>= 3.2.21), libnm0 (>= 1.8.0), libpolkit-agent-1-0 (>= 0.99), libpolkit-gobject-1-0 (>= 0.104), libpsl5 (>= 0.13.0), libreadline7 (>= 6.0), libselinux1 (>= 1.32), libsystemd0 (>= 221), libudev1 (>= 183), libuuid1 (>= 2.16)

# grep GLIBC_2.25 -r .
Binary file ./debian/tmp/usr/sbin/NetworkManager matches
Binary file ./debian/tmp/usr/lib/NetworkManager/nm-iface-helper matches
Binary file ./debian/network-manager/usr/sbin/NetworkManager matches
Binary file ./debian/network-manager/usr/lib/NetworkManager/nm-iface-helper matches
Binary file ./src/NetworkManager matches
Binary file ./src/nm-iface-helper matches
Binary file ./src/devices/wifi/tests/test-general matches
Binary file ./src/devices/tests/test-lldp matches
Binary file ./src/dhcp/tests/test-dhcp-utils matches
Binary file ./src/dhcp/tests/test-dhcp-dhclient matches
Binary file ./src/tests/test-resolvconf-capture matches
Binary file ./src/tests/test-ip4-config matches
Binary file ./src/tests/test-ip6-config matches
Binary file ./src/tests/test-general matches
Binary file ./src/tests/test-systemd matches
Binary file ./src/tests/config/test-config matches
Binary file ./src/settings/plugins/keyfile/tests/test-keyfile matches

# ldd /usr/sbin/NetworkManager
/usr/sbin/NetworkManager: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /usr/sbin/NetworkManager)

I will add a manual dep to network-manager but this is weird.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Inspecting with readelf I see this:

Version needs section '.gnu.version_r' contains 9 entries:
 Addr: 0x0000000000010a80 Offset: 0x010a80 Link: 6 (.dynstr)
  000000: Version: 1 File: ld-linux-x86-64.so.2 Cnt: 1
  0x0010: Name: GLIBC_2.3 Flags: none Version: 20
  0x0020: Version: 1 File: libuuid.so.1 Cnt: 1
  0x0030: Name: UUID_1.0 Flags: none Version: 18
  0x0040: Version: 1 File: libdl.so.2 Cnt: 1
  0x0050: Name: GLIBC_2.2.5 Flags: none Version: 13
  0x0060: Version: 1 File: libudev.so.1 Cnt: 1
  0x0070: Name: LIBUDEV_183 Flags: none Version: 8
  0x0080: Version: 1 File: libsystemd.so.0 Cnt: 1
  0x0090: Name: LIBSYSTEMD_209 Flags: none Version: 7
  0x00a0: Version: 1 File: libcurl-gnutls.so.4 Cnt: 1
  0x00b0: Name: CURL_GNUTLS_3 Flags: none Version: 6
  0x00c0: Version: 1 File: libgnutls.so.30 Cnt: 1
  0x00d0: Name: GNUTLS_3_4 Flags: none Version: 5
  0x00e0: Version: 1 File: libpthread.so.0 Cnt: 1
  0x00f0: Name: GLIBC_2.2.5 Flags: none Version: 3
  0x0100: Version: 1 File: libc.so.6 Cnt: 11
  0x0110: Name: GLIBC_2.9 Flags: none Version: 19
  0x0120: Name: GLIBC_2.17 Flags: none Version: 17
  0x0130: Name: GLIBC_2.14 Flags: none Version: 16
  0x0140: Name: GLIBC_2.8 Flags: none Version: 15
  0x0150: Name: GLIBC_2.3.4 Flags: none Version: 14
  0x0160: Name: GLIBC_2.3.2 Flags: none Version: 12
  0x0170: Name: GLIBC_2.25 Flags: none Version: 11
  0x0180: Name: GLIBC_2.7 Flags: none Version: 10
  0x0190: Name: GLIBC_2.3 Flags: none Version: 9
  0x01a0: Name: GLIBC_2.2.5 Flags: none Version: 4
  0x01b0: Name: GLIBC_2.4 Flags: none Version: 2

Maybe shlibdeps doesn't process .gnu.version_r sections?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

maybe Dpkg/Shlibs/Objdump.pm doesn't parse that section?

Or maybe objdump output changed, hence the parsing fails?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I believe this is a bug in dpkg, since it does not parse 'Version References:' paragraph of data.

Changed in dpkg (Ubuntu):
status: New → Triaged
Changed in debhelper (Ubuntu):
status: New → Invalid
Changed in binutils (Ubuntu):
status: New → Invalid
Changed in glibc (Ubuntu):
status: New → Invalid
Changed in network-manager (Ubuntu):
status: New → Triaged
Changed in dpkg (Debian):
status: Unknown → New
Changed in dpkg (Debian):
status: New → Incomplete
Revision history for this message
Matthias Klose (doko) wrote :

I think there is at least a bug in network-manager: it defines (for whatever reason) an explicit_bzero function, which is not used when building with -D_FORTIFY_SOURCE. The reference in string_erase is transformed from explicit_bzero to explicit_bzero_chk. So if network-manager defines explicit_bzero, then it should define explicit_bzero_chk as well.

Note that linking with gold (both 2.28 and 2.29) you end up with an undefined symbol GLIBC_2.25 __explicit_bzero_chk.

The bfd linker however seems to optimize that out, and doesn't leave any undefined symbol. However in ld-2.29 it leaves a reference in

Version needs section '.gnu.version_r' contains 9 entries:

  0x0170: Name: GLIBC_2.25 Flags: none Version: 11

Removing this unused explicit_bzero function seems to work, and the string-util.h is not installed anywhere, it shouldn't be part of any API.

Revision history for this message
Matthias Klose (doko) wrote :
Matthias Klose (doko)
Changed in binutils (Ubuntu):
status: Invalid → New
status: New → Triaged
Changed in dpkg (Debian):
status: Incomplete → New
Changed in binutils:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in dpkg (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package binutils - 2.29-13ubuntu1

---------------
binutils (2.29-13ubuntu1) artful; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

binutils (2.29-13) unstable; urgency=medium

  * Build again all cross packages.

binutils (2.29-12) unstable; urgency=medium

  * Update, taken from the 2.29 branch 20170919.
    - Fix PR ld/21441, PowerPC64 stubs don't match calculated size.
      Closes: #876134.
    - Fix PR ld/22048, Incorrect .eh_frame section in libc.so.
    - Fix PR ld/22150, ld keeps a version reference for gc'd symbols.
      Closes: #874585. LP: #1715641.
    - Fix PR ld/22148, Integer overflow in elf64-x86-64.c.
    - Fix PR ld/21924, Require GCC 5 or above for 3 x86 tests.
  * Fix installation of test summaries.
  * Compare test summaries for cross builds.

 -- Matthias Klose <email address hidden> Tue, 19 Sep 2017 13:09:15 +0200

Changed in binutils (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package network-manager - 1.8.2-1ubuntu8

---------------
network-manager (1.8.2-1ubuntu8) artful; urgency=medium

  * debian/network-manager.postinst: drop in an empty override file for
    NetworkManager to manage all devices for upgrade from any version, as long
    as there is no netplan configuration yet. (LP: #1676547)

 -- Brian Murray <email address hidden> Mon, 11 Sep 2017 10:20:18 -0700

Changed in network-manager (Ubuntu):
status: Triaged → Fix Released
Changed in binutils:
status: Confirmed → Fix Released
Changed in dpkg (Ubuntu):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.