Bug 1766993 - fence_virtd: fix segfault in vl_get when no domains are found
Summary: fence_virtd: fix segfault in vl_get when no domains are found
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: fence-virt
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.2
Assignee: Oyvind Albrigtsen
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1766995
TreeView+ depends on / blocked
 
Reported: 2019-10-30 12:43 UTC by Oyvind Albrigtsen
Modified: 2020-04-28 15:56 UTC (History)
3 users (show)

Fixed In Version: fence-virt-0.4.0-9.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1766995 (view as bug list)
Environment:
Last Closed: 2020-04-28 15:56:26 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1668 None None None 2020-04-28 15:56:29 UTC

Description Oyvind Albrigtsen 2019-10-30 12:43:58 UTC
Description of problem:
If virConnectListAllDomains() returns 0 on every iteration, the loop
will end with a vl == NULL and the pointer dereference in the qsort()
call will result in a segfault, so we need to check for NULL on completion of the loop to guard against that.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Start fence_virtd with no domains present
2.
3.

Actual results:
Segfaults.

Expected results:
Doesnt segfault.

Additional info:

Comment 1 Oyvind Albrigtsen 2019-10-30 12:46:09 UTC
https://github.com/ClusterLabs/fence-virt/pull/17

Comment 3 Oyvind Albrigtsen 2020-01-30 09:26:43 UTC
Additional patch to solve when it doesnt stop until systemd timeout's and kills it (found by QE):
https://github.com/ClusterLabs/fence-virt/commit/958c0035aa6a69149c1a0fa218863c26e755d9e6#diff-136aa843c9c2f4617a44f9978e771f3a

Comment 6 errata-xmlrpc 2020-04-28 15:56:26 UTC
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://access.redhat.com/errata/RHBA-2020:1668


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