1. 21 1月, 2016 2 次提交
  2. 20 1月, 2016 1 次提交
  3. 05 1月, 2016 1 次提交
  4. 24 12月, 2015 26 次提交
  5. 13 12月, 2015 1 次提交
    • E
      CVE-2015-5313: storage: don't allow '/' in filesystem volume names · d0357966
      Eric Blake 提交于
      The libvirt file system storage driver determines what file to
      act on by concatenating the pool location with the volume name.
      If a user is able to pick names like "../../../etc/passwd", then
      they can escape the bounds of the pool.  For that matter,
      virStoragePoolListVolumes() doesn't descend into subdirectories,
      so a user really shouldn't use a name with a slash.
      
      Normally, only privileged users can coerce libvirt into creating
      or opening existing files using the virStorageVol APIs; and such
      users already have full privilege to create any domain XML (so it
      is not an escalation of privilege).  But in the case of
      fine-grained ACLs, it is feasible that a user can be granted
      storage_vol:create but not domain:write, and it violates
      assumptions if such a user can abuse libvirt to access files
      outside of the storage pool.
      
      Therefore, prevent all use of volume names that contain "/",
      whether or not such a name is actually attempting to escape the
      pool.
      
      This changes things from:
      
      $ virsh vol-create-as default ../../../../../../etc/haha --capacity 128
      Vol ../../../../../../etc/haha created
      $ rm /etc/haha
      
      to:
      
      $ virsh vol-create-as default ../../../../../../etc/haha --capacity 128
      error: Failed to create vol ../../../../../../etc/haha
      error: Requested operation is not valid: volume name '../../../../../../etc/haha' cannot contain '/'
      Signed-off-by: NEric Blake <eblake@redhat.com>
      (cherry picked from commit 034e47c3)
      d0357966
  6. 16 10月, 2015 1 次提交
  7. 07 10月, 2015 2 次提交
    • C
      spec: Fix some warnings with latest rpmbuild · 404e42d3
      Cole Robinson 提交于
      $ rpmbuild -ba libvirt.spec
      warning: Macro expanded in comment on line 5: # If neither fedora nor rhel was defined, try to guess them from %{dist}
      
      warning: Macro %enable_autotools defined but not used within scope
      warning: Macro %client_only defined but not used within scope
      ...
      
      (cherry picked from commit dae1250b)
      404e42d3
    • C
      qemu: Fix dynamic_ownership qemu.conf setting · ee7a6085
      Cole Robinson 提交于
      Commit 307fb904 (Sep 10) added a 'privileged' variable when creating
      the DAC driver:
      
      @@ -153,6 +157,7 @@ virSecurityManagerNewDAC(const char *virtDriver,
                                bool defaultConfined,
                                bool requireConfined,
                                bool dynamicOwnership,
      +                         bool privileged,
                                virSecurityManagerDACChownCallback chownCallback)
      
      But argument order is mixed up at the caller, swapping dynamicOwnership
      and privileged values. This corrects the argument order
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1266628
      (cherry picked from commit 68572de8)
      ee7a6085
  8. 22 9月, 2015 6 次提交
    • C
      Prep for release 1.2.18.1 · a267bb50
      Cole Robinson 提交于
      a267bb50
    • D
      test driver: don't unlock pool after freeing it · 7d2cf485
      David Mansfield 提交于
       Invalid read of size 4
          at 0x945CA30: __pthread_mutex_unlock_full (in /lib64/libpthread-2.20.so)
          by 0x4F0404B: virMutexUnlock (virthread.c:94)
          by 0x4F7161B: virStoragePoolObjUnlock (storage_conf.c:2603)
          by 0x4FE0476: testStoragePoolUndefine (test_driver.c:4328)
          by 0x4FCF086: virStoragePoolUndefine (libvirt-storage.c:656)
          by 0x15A7F5: cmdPoolUndefine (virsh-pool.c:1721)
          by 0x12F48D: vshCommandRun (vsh.c:1212)
          by 0x132AA7: main (virsh.c:943)
        Address 0xfda56a0 is 16 bytes inside a block of size 104 free'd
          at 0x4C2BA6C: free (vg_replace_malloc.c:473)
          by 0x4EA5C96: virFree (viralloc.c:582)
          by 0x4F70B69: virStoragePoolObjFree (storage_conf.c:412)
          by 0x4F7167B: virStoragePoolObjRemove (storage_conf.c:437)
          by 0x4FE0468: testStoragePoolUndefine (test_driver.c:4323)
          by 0x4FCF086: virStoragePoolUndefine (libvirt-storage.c:656)
          by 0x15A7F5: cmdPoolUndefine (virsh-pool.c:1721)
          by 0x12F48D: vshCommandRun (vsh.c:1212)
          by 0x132AA7: main (virsh.c:943)
      
      (cherry picked from commit 03cf57a3)
      7d2cf485
    • C
      libxl: fix AttachDeviceConfig on hostdev type · e60d286b
      Chunyan Liu 提交于
      After attach-device a <hostdev> with --config, new device doesn't
      show up in dumpxml and in guest.
      
      To fix that, set dev->data.hostdev = NULL after work so that the
      pointer is not freed, since vmdef has the pointer and still need it.
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      (cherry picked from commit 56945e13)
      e60d286b
    • M
      security_selinux: Take @privileged into account · a4582321
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1124841
      
      If running in session mode it may happen that we fail to set
      correct SELinux label, but the image may still be readable to
      the qemu process. Take this into account.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      (cherry picked from commit 00e5b967)
      a4582321
    • G
      selinux: fix compile errors · eb8382fa
      Guido Günther 提交于
      Remove unused variable, tag unused parameter and adjust return type.
      
      introduced by 3f48345f
      
      CC     security/libvirt_security_manager_la-security_selinux.lo
      security/security_selinux.c: In function 'virSecuritySELinuxDomainSetDirLabel':
      security/security_selinux.c:2520:5: error: return makes pointer from integer without a cast [-Werror]
      security/security_selinux.c:2514:9: error: unused variable 'ret' [-Werror=unused-variable]
      security/security_selinux.c:2509:59: error: unused parameter 'mgr' [-Werror=unused-parameter]
      
      (cherry picked from commit 4d4c90df)
      eb8382fa
    • M
      security_selinux: Add SetDirLabel support · 82dce087
      Martin Kletzander 提交于
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      (cherry picked from commit 3f48345f)
      82dce087