Bug 964358
Summary: | virSetUIDGID can deadlock due to unsafe use of getpwuid_r | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Eric Blake <eblake> | |
Component: | libvirt | Assignee: | Eric Blake <eblake> | |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 18 | CC: | berrange, clalancette, crobinso, eblake, itamar, jforbes, jyang, laine, libvirt-maint, veillard | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | libvirt-0.10.2.7-1.fc18 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 964359 (view as bug list) | Environment: | ||
Last Closed: | 2013-08-15 02:55:10 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: |
Description
Eric Blake
2013-05-18 03:09:14 UTC
This BZ was cloned to Bug 964359 for RHEL. (I removed the automatically added "Depends on" from the clone, which removed the automatically added "Blocks from this BZ. It is correct that the two bugs don't have a depends/block relationship, but eliminating it removes all reference of the other BZ from this one, which also isn't good. This comment restores the connection.) Initial upstream attempt at patching this: https://www.redhat.com/archives/libvir-list/2013-May/msg01600.html Eric, did this ever get a repost? I can't find it but maybe the patch topic changed. I raised a potential issue in the review that ended up being valid, and I believe he was trying to get the license relaxed for a gnulib function he wanted to use as a solution: https://www.redhat.com/archives/libvir-list/2013-May/msg01646.html I couldn't find a patch either, and he's on vacation now. Repost is still pending once the gnulib license issues are sorted. I had hoped to clean it up before my vacation began, but was missing confirmation from one original author at the time; now it will more likely be the last week in June before I repost. Another attempt at the upstream patch: https://www.redhat.com/archives/libvir-list/2013-July/msg00566.html Fixed for qemu upstream as of: commit ee777e994927ed5f2d427fbc5a53cbe8b5969bda Author: Eric Blake <eblake> Date: Tue May 21 20:59:10 2013 -0600 util: make virSetUIDGID async-signal-safe https://bugzilla.redhat.com/show_bug.cgi?id=964358 POSIX states that multi-threaded apps should not use functions that are not async-signal-safe between fork and exec, yet we were using getpwuid_r and initgroups. Although rare, it is possible to hit deadlock in the child, when it tries to grab a mutex that was already held by another thread in the parent. I actually hit this deadlock when testing multiple domains being started in parallel with a command hook, with the following backtrace in the child: ... Still needs additional fixes for lxc: https://www.redhat.com/archives/libvir-list/2013-July/msg00849.html https://www.redhat.com/archives/libvir-list/2013-July/msg00853.html I've backported all the patches required to the v1.0.5-maint branch (F19) and the v0.10.2-maint branch (F18); the next maint release that Cole cuts from each branch will include the fix. libvirt-0.10.2.7-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/libvirt-0.10.2.7-1.fc18 Package libvirt-0.10.2.7-1.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing libvirt-0.10.2.7-1.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-14066/libvirt-0.10.2.7-1.fc18 then log in and leave karma (feedback). libvirt-0.10.2.7-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. |