Please consider backporting a p11-kit deadlock fix

Bug #1381743 reported by Andy Lutomirski
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
p11-kit (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Linking against p11-kit or gnutls (especially the outdated gnutls in Trusty) can cause fork() to deadlock randomly. Please consider backporting the stable fix here:

http://cgit.freedesktop.org/p11-glue/p11-kit/commit/?h=stable&id=0ecc141f372b375ddd2087a8ca406797976f03bf

Revision history for this message
Andy Lutomirski (luto-mit) wrote :

This package doesn't seem to be set up with an upstream tracker link. Here's the upstream bug:

https://bugs.freedesktop.org/show_bug.cgi?id=84567

Revision history for this message
Scott Kitterman (kitterman) wrote :

We'd need the information in https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template - including a test case. Did you look at how cleanly the upstream patch applies?

Revision history for this message
Andy Lutomirski (luto-mit) wrote :

Here are my attempts to answer the questions in the SRU template. I'm not an Ubuntu developer, and I don't speak Debian package language (I speak RPM, but that's rather different), so I'm not going to send an actual debdiff or whatever it's called.

Note, however, that I confused myself with the git history. The latest upstream release in the 0.20 series is 0.20.7, and 0.20.7 does not have the fix. The fix I linked applies directly on top of 0.20.7.

This bug should therefore be fixed in Vivid before worrying about backports.

The fix does *not* apply to 0.20.3 as is. I can try to backport it, but I'd want confirmation that it would be likely to be applied (as opposed to bumping p11-kit to a newer microrelease or just leaving it unfixed).

[Impact]

Multithreaded programs that use p11-kit and call fork can deadlock due to a race. More complex programs that use certain malloc replacements and link to libraries like libvmime may deadlock when forking as well, even if they don't use p11-kit.

The deadlock is caused by the use of non async-signal-safe functions in an atfork handler in p11-kit.

[Test Case]

Compile and run the attached program. With a buggy p11-kit, it is very likely to deadlock. With a fixed p11-kit, it will exit after about five seconds.

[Regression Potential]

When I looked at the patch, it looked straightforward.

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

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

Changed in p11-kit (Ubuntu):
status: New → Confirmed
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.