gnutls causes gnome-music segmentation fault

Bug #1804673 reported by KarlRelton
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-music (Ubuntu)
Invalid
High
Unassigned
Cosmic
Invalid
Undecided
Unassigned
Disco
Invalid
High
Unassigned
gnutls28 (Ubuntu)
Fix Released
High
Unassigned
Cosmic
Fix Released
Undecided
Unassigned
Disco
Fix Released
High
Unassigned

Bug Description

[Impact]
Apps using libsoup crash in gnutls28 sometimes. gnome-music is useless if it needs to fetch cover art

[Test case]

$ pull-lp-source libsoup2.4
$ cd libsoup2.4-*
$ ./debian/rules/build
$ ./obj-x86_64-linux-gnu/examples/get https://tracker.debian.org/pkg/acpi-support/rss

Make sure it does not segfault

[Regression potential]
This changes the code to not reset priorities after or during initial negotiation, so if the user changed priorities, we do not override the chosen one from the initial handshake in a rehandshake.

Therefore, the only problems could be thus related to rehandshakes that could now fail and succeeded before.

[Original bug report]

gnome-music gives segmentation fault on startup in Cosmic Cuttlefish release.

gbd on core file gives:
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007f6446dc74d0 in gnutls_aead_cipher_encryptv ()
   from /usr/lib/x86_64-linux-gnu/libgnutls.so.30
#2 0x00007f6446d94ed7 in ?? () from /usr/lib/x86_64-linux-gnu/libgnutls.so.30
#3 0x00007f6446d90f3c in ?? () from /usr/lib/x86_64-linux-gnu/libgnutls.so.30
#4 0x00007f6446d9acc1 in ?? () from /usr/lib/x86_64-linux-gnu/libgnutls.so.30
#5 0x00007f6446d9cc28 in ?? () from /usr/lib/x86_64-linux-gnu/libgnutls.so.30
#6 0x00007f6446ddd190 in ?? () from /usr/lib/x86_64-linux-gnu/libgnutls.so.30
#7 0x00007f6446ddd2be in gnutls_session_key_update ()
   from /usr/lib/x86_64-linux-gnu/libgnutls.so.30
#8 0x00007f644002e54f in ?? ()
   from /usr/lib/x86_64-linux-gnu/gio/modules/libgiognutls.so
#9 0x00007f644002eb36 in ?? ()
   from /usr/lib/x86_64-linux-gnu/gio/modules/libgiognutls.so
#10 0x00007f646645ac03 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#11 0x00007f64668ebad3 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007f64668eb135 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007f6467761164 in start_thread (arg=<optimized out>)
    at pthread_create.c:486
#14 0x00007f6467894def in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Looks like Fedora had same issue, tracked down to an issue in gnutls. See
https://bugzilla.redhat.com/show_bug.cgi?id=1640062 and
https://bugzilla.redhat.com/show_bug.cgi?id=1634736

Description: Ubuntu 18.10
Release: 18.10

gnome-music:
  Installed: 3.30.1-1
  Candidate: 3.30.1-1

libgnutls30:
  Installed: 3.6.4-2ubuntu1
  Candidate: 3.6.4-2ubuntu1

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-music (Ubuntu):
status: New → Confirmed
Changed in gnutls28 (Ubuntu):
status: New → Confirmed
Revision history for this message
Jesse (jessemaurais) wrote :

I have confirmed the bug and also confirmed that the patch applied to the apt-src package will fix the problem.

Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue was fixed upstream in https://gitlab.com/gnutls/gnutls/commit/a18258dc

Changed in gnutls28 (Ubuntu):
importance: Undecided → High
status: Confirmed → In Progress
Changed in gnome-music (Ubuntu):
importance: Undecided → High
status: Confirmed → Invalid
tags: added: rls-dd-incoming
Changed in gnutls28 (Ubuntu):
status: In Progress → Confirmed
tags: added: cosmic disco
removed: rls-dd-incoming
tags: added: id-5c094cf5db324d83d4f9d4ff
Revision history for this message
Julian Andres Klode (juliank) wrote :

Working on reproducing it so I can get it fixed in stable. Was not able to reproduce on my disco host system, now trying a cosmic container.

Is bionic affected as well? Probably not.

Revision history for this message
Julian Andres Klode (juliank) wrote :

cosmic works fine as well in a container, except for gnome-music missing a dependency on gir1.2-goa-1.0

Revision history for this message
Julian Andres Klode (juliank) wrote :

Never mind my last comment, I accidentally launched a bionic container. So it seems to me that:

* bionic GOOD
* cosmic BAD
* disco GOOD

though I guess I'll revalidate disco in a container or look at git history.

Revision history for this message
Julian Andres Klode (juliank) wrote :

disco should be bad as well, though, shouldn't it? And the crash I got in cosmic was seemingly unrelated.

Revision history for this message
KarlRelton (karllinuxtest-relton) wrote :

I think to trigger the bug (using gnome-music) you need a music collection where it needs to try and look up at least some album artwork. If you have an empty music library gnome-music will start fine because the gnutls code is never invoked.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the upstream/redhat tickets test with the 'get' test from the libsoup source

Changed in gnutls28 (Ubuntu Disco):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnutls28 - 3.6.5-2ubuntu1

---------------
gnutls28 (3.6.5-2ubuntu1) disco; urgency=low

  * Merge from Debian unstable. Remaining changes:
    - debian/patches/disable_global_init_override_test.patch: disable
      failing test.
    - debian/patches/add-openssl-test-link.patch: add link for libssl
  * this is a new upstream release including a fix for LP: #1804673

gnutls28 (3.6.5-2) unstable; urgency=low

  * Upload to unstable.
  * autopkgtest: Do not try to run cbc-record-check.sh, export ENABLE_GOST=1.

gnutls28 (3.6.5-1) experimental; urgency=medium

  * Run "wrap-and-sort --max-line-length=72 --short-indent" and back comments.
  * Drop automake (>= 1:1.12.2) from Build-Depends; automake 1.14 is
    now in oldstable.
  * New upstream version.
    + Requires nettle >= 3.4.1(rc).
    + List newly added symbols in symbol file. Bump generated dependencies to
      >= 3.6.5 since multiple enums have been extended.
    + Accepts CTYPE-OPENPGP as (no-op) priority list element. Closes: #910835
  * [lintian] Drop dh_strip override, stable has automatic debug packages.

 -- Julian Andres Klode <email address hidden> Tue, 18 Dec 2018 17:24:06 +0100

Changed in gnutls28 (Ubuntu Disco):
status: Fix Committed → Fix Released
Revision history for this message
Marcus Wichelmann (l-admin-3) wrote :

Will there be a backport for cosmic?
I'm using cosmic (18.10) and the gnome-music app ist crashing on every start because Cosmic only ships 3.6.4-2ubuntu1.

description: updated
Changed in gnutls28 (Ubuntu Cosmic):
status: New → In Progress
no longer affects: gnutls28 (Ubuntu Bionic)
no longer affects: gnome-music (Ubuntu Bionic)
Changed in gnome-music (Ubuntu Cosmic):
status: New → Invalid
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello KarlRelton, or anyone else affected,

Accepted gnutls28 into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnutls28/3.6.4-2ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gnutls28 (Ubuntu Cosmic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-cosmic
Revision history for this message
Marcus Wichelmann (l-admin-3) wrote :

Unfortunately this didn't seem to help, at least on my system.

After installing gnutls-bin 3.6.4-2ubuntu1.1 from cosmic-proposed and starting gnome-music I still get a segfault after the window shows up for a second and loads some album arts.
Or am I experiencing another bug?

Revision history for this message
Julian Andres Klode (juliank) wrote :

@Marcus gnutls-bin won't help you, you have to install libgnutls30 - can you do that and report back? thanks.

Revision history for this message
Marcus Wichelmann (l-admin-3) wrote :

@Julian: Thank you, my fault.
This fixes the bug!

Thank you very much, that's the first time I can actually see how the gnome-music application looks like. xD

tags: added: verification-done-cosmic
removed: verification-needed
tags: added: verification-needed
removed: verification-needed-cosmic
Revision history for this message
Marcus Wichelmann (l-admin-3) wrote :

I'm sorry, the launchpad interface is awful. :D

Revision history for this message
Julian Andres Klode (juliank) wrote :
Download full text (6.7 KiB)

Verified from my side as well, with -ubuntu1 it was broken, with the version in proposed it is fixed.

root@cc:~/libsoup2.4-2.64.2# ./obj-x86_64-linux-gnu/examples/get https://tracker.debian.org/pkg/acpi-support/rss [2004/5679]
Segmentation fault (core dumped)
root@cc:~/libsoup2.4-2.64.2# apt policy libgnutls30
libgnutls30:
  Installed: 3.6.4-2ubuntu1
  Candidate: 3.6.4-2ubuntu1.1
  Version table:
     3.6.4-2ubuntu1.1 500
        500 http://archive.ubuntu.com/ubuntu cosmic-proposed/main amd64 Packages
 *** 3.6.4-2ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu cosmic/main amd64 Packages ...

Read more...

tags: added: verification-done
removed: verification-needed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Thank you for your verification! The cosmic upload triggered a lot of autopkgtest failures, hopefully all unrelated. Could someone take a look and verify those?

Revision history for this message
Julian Andres Klode (juliank) wrote :

status

* hddemux is OK essentially; it's the same failure as I fixed in ubuntu1 in disco
* apt OK
* systemd mostly usual boot-smoke failure, one fsckd service failure (timing related probably), nothing particularly gnutls related
* gnupg2 is irrelevant gpgv-win32 test failing because wine is not installable
* gnustep-base ? retried
* lxc ? retried

gnustep-base and lxc fail only on one arch, so should not be caused by disabling version overrides on a rehandshake (there's nothing arch specific about it...).

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for gnutls28 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnutls28 - 3.6.4-2ubuntu1.1

---------------
gnutls28 (3.6.4-2ubuntu1.1) cosmic; urgency=medium

  * gnutls-3.6.4-fix-rehandshake.patch: Fix rehandshake breaking glib
    stuff (LP: #1804673)

 -- Julian Andres Klode <email address hidden> Mon, 21 Jan 2019 08:56:16 +0100

Changed in gnutls28 (Ubuntu Cosmic):
status: Fix Committed → Fix Released
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.