Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 814080 - Syscall param rt_sigaction(act->sa_flags) points to uninitialised byte(s)
Syscall param rt_sigaction(act->sa_flags) points to uninitialised byte(s)
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Alex Jia
Virtualization Bugs
: Reopened
Depends On:
Blocks: 811683
  Show dependency treegraph
 
Reported: 2012-04-19 04:03 EDT by Alex Jia
Modified: 2012-06-20 02:54 EDT (History)
7 users (show)

See Also:
Fixed In Version: libvirt-0.9.10-14.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 02:54:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 15:31:38 EDT

  None (edit)
Description Alex Jia 2012-04-19 04:03:17 EDT
Description of problem:
The function cmdBlockPull() uses uninitialised memory.

Version-Release number of selected component (if applicable):
# rpm -q libvirt-client
libvirt-client-0.9.10-13.el6.x86_64


How reproducible:
always.

Steps to Reproduce:
$ qemu-img create /var/lib/libvirt/images/test 1M

$ cat > /tmp/test.xml <<EOF
<domain type='qemu'>
  <name>test</name>
  <memory>219200</memory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64'>hvm</type>
    <boot dev='hd'/>
  </os>
  <devices>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/test'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' autoport='yes' listen='0.0.0.0'/>
  </devices>
</domain>
EOF

$ virsh define /tmp/test.xml
$ valgrind -v virsh blockpull test /var/lib/libvirt/images/test --wait

  
Actual results:

==10906== 1 errors in context 1 of 1:
==10906== Syscall param rt_sigaction(act->sa_flags) points to uninitialised byte(s)
==10906==    at 0x39CF80F5BE: __libc_sigaction (sigaction.c:67)
==10906==    by 0x43016C: cmdBlockPull (virsh.c:7638)
==10906==    by 0x4150D4: vshCommandRun (virsh.c:18574)
==10906==    by 0x425E73: main (virsh.c:20178)
==10906==  Address 0x7fefffae8 is on thread 1's stack

Expected results:
fix uninitialized memory usage.

Additional info:
Comment 1 Alex Jia 2012-04-19 04:04:21 EDT
Patch for upstream:
https://www.redhat.com/archives/libvir-list/2012-April/msg00980.html
Comment 2 Alex Jia 2012-04-20 01:41:19 EDT
In POST:
commit 2aed9a97f86ed2fd868ca3240c07076e116ced7b
Author: Eric Blake <eblake@redhat.com>
Date:   Thu Apr 19 16:51:11 2012 +0800

    virsh: avoid uninitialized memory usage
    
    Detected by valgrind, via Alex Jia.  Caused by imcomplete
    copy-and-paste from vshWatchJob in commit 3b96a892.
    
    * tools/virsh.c (cmdBlockPull): fix uninitialized memory usage.
Comment 4 Eric Blake 2012-04-24 00:14:30 EDT
I marked this separately in bug 782457#c23, since that one had not been verified yet.

*** This bug has been marked as a duplicate of bug 782457 ***
Comment 5 Eric Blake 2012-04-24 00:20:20 EDT
Wrong bug comment; I meant: dup of bug 811683#c11

*** This bug has been marked as a duplicate of bug 811683 ***
Comment 9 Alex Jia 2012-04-24 04:31:54 EDT
The issue has been fixed on rhel6.2 with libvirt-0.9.10-14.el6.x86_64.

BTW, I will meet the following error. it should be a expected result, right?
error: unsupported configuration: block jobs not supported with this QEMU binary
Comment 18 Alex Jia 2012-04-26 11:54:26 EDT
Move the bug to verified status based on Comment 9.
Comment 20 errata-xmlrpc 2012-06-20 02:54:39 EDT
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.

http://rhn.redhat.com/errata/RHSA-2012-0748.html

Note You need to log in before you can comment on or make changes to this bug.