Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionRichard W.M. Jones
2014-09-23 12:29:03 UTC
Description of problem:
There are two problems revealed by valgrind. They are in similar parts
of the code, but may not be related. Anyway:
==19319== Conditional jump or move depends on uninitialised value(s)
==19319== at 0x7A108C6: ??? (in /usr/lib64/libselinux.so.1)
==19319== by 0x7A0CECB: selabel_close (in /usr/lib64/libselinux.so.1)
==19319== by 0x545B5DB: virSecuritySELinuxSecurityDriverClose (security_selin
ux.c:806)
==19319== by 0x5457D52: virSecurityManagerDispose (security_manager.c:56)
==19319== by 0x52D8372: virObjectUnref (virobject.c:265)
==19319== by 0x5455CDE: virSecurityStackClose (security_stack.c:94)
==19319== by 0x5457D52: virSecurityManagerDispose (security_manager.c:56)
==19319== by 0x52D8372: virObjectUnref (virobject.c:265)
==19319== by 0x1C418D2D: qemuStateCleanup (qemu_driver.c:1050)
==19319== by 0x5370427: virStateCleanup (libvirt.c:781)
==19319== by 0x11D2AD: main (libvirtd.c:1544)
==19319== 57 bytes in 9 blocks are definitely lost in loss record 420 of 673
==19319== at 0x4C2845D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==19319== by 0x82D0909: strndup (in /usr/lib64/libc-2.17.so)
==19319== by 0x7A11752: ??? (in /usr/lib64/libselinux.so.1)
==19319== by 0x7A11B4C: ??? (in /usr/lib64/libselinux.so.1)
==19319== by 0x7A0CDE0: selabel_open (in /usr/lib64/libselinux.so.1)
==19319== by 0x545B68D: virSecuritySELinuxSecurityDriverOpen (security_selinux.c:481)
==19319== by 0x5457E88: virSecurityManagerNewDriver (security_manager.c:110)
==19319== by 0x1C41A628: qemuStateInitialize (qemu_driver.c:408)
==19319== by 0x537029E: virStateInitialize (libvirt.c:743)
==19319== by 0x11EDBA: daemonRunStateInit (libvirtd.c:917)
==19319== by 0x52EDFFD: virThreadHelper (virthread.c:197)
==19319== by 0x7C2EDF2: start_thread (in /usr/lib64/libpthread-2.17.so)
Version-Release number of selected component (if applicable):
libvirt 1.2.8-3.el7.x86_64
How reproducible:
Unknown, at least once.
Steps to Reproduce:
1. valgrind libvirtd &
(Note that I am not daemonizing libvirtd)
Comment 1Richard W.M. Jones
2014-09-23 12:29:54 UTC
Since this might be in libselinux:
libselinux-2.2.2-6.el7.x86_64
With this reproducer:
1 #include <selinux/selinux.h>
2 #include <selinux/label.h>
3 #include <stdlib.h>
4
5 int main()
6 {
7 struct selabel_handle *hndl = selabel_open(SELABEL_CTX_FILE, NULL, 0);
8
9 selabel_close(hndl);
10 }
Run as non-root, I'm getting:
==27521== Conditional jump or move depends on uninitialised value(s)
==27521== at 0x4E408C6: closef (label_file.c:570)
==27521== by 0x4E3CECB: selabel_close (label.c:263)
==27521== by 0x40071B: main (lol.c:9)
==27521==
==27521==
==27521== HEAP SUMMARY:
==27521== in use at exit: 0 bytes in 0 blocks
==27521== total heap usage: 33,117 allocs, 33,117 frees, 4,928,739 bytes allocated
This does not happen if I run it as root or if I do:
chmod a+r /etc/selinux/targeted/contexts/files/*.bin
I was not able to reproduce the memory leak.
libselinux-devel-2.2.2-6.el7.x86_64
selinux-policy-3.12.1-153.el7_0.10.noarch
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2016-2276.html