1. 09 4月, 2019 2 次提交
    • J
      util: Fix uninitalized variable to avoid garbage · 692400f4
      Julio Faracco 提交于
      This commit fixes an unitialized variable to avoid garbage value
      when virNetDevBridgeGet method returns error. When, that method fails
      before initialize 'val' variable, it can cause problems related to
      that.
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      692400f4
    • E
      snapshot: Fix use-after-free during snapshot delete · f66f70ac
      Eric Blake 提交于
      Commit b647d219 introduced a use-after-free situation when the caller
      is trying to delete a snapshot and its children: if the callback
      function deletes the parent, it is no longer safe to query the parent
      to learn which children also need to be deleted (where we previously
      saved deleting the parent for last).  To fix the problem, while still
      maintaining support for topological visits of callback functions, we
      have to stash off any information needed for later traversal prior to
      using a callback function (virDomainMomentForEachChild already does
      this, it is only virDomainMomentActOnDescendant that was running into
      problems).
      
      Sadly, the testsuite did not cover the problem at the time. Worse,
      even though I later added commit 280a2b41 to catch problems like
      this, and even though that test is indeed sufficient to detect the
      problem when run under valgrind or suitable MALLOC_PERTURB_ settings,
      I'm guilty of not running the test in such an environment.  Thus,
      v5.2.0 has a regression that could have been prevented had we used the
      testsuite to its full power. On the bright side, deleting snapshots
      requires ACL domain:snapshot, which is arguably as powerful as
      domain:write, so I don't think this use-after-free forms a security
      hole.
      
      At some point, it would be nice to convert virDomainMomentObj into a
      virObject, at which point, the solution is even simpler: add
      virObjectRef/Unref around the callback. But as that will require
      auditing even more places in the code, I went with the simplest patch
      for the regression fix.
      
      Fixes: b647d219Reported-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Tested-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
      f66f70ac
  2. 08 4月, 2019 3 次提交
  3. 06 4月, 2019 1 次提交
  4. 05 4月, 2019 13 次提交
  5. 04 4月, 2019 18 次提交
  6. 03 4月, 2019 3 次提交