Bug 1772842
| Summary: | Libvirtd is passing a NULL for the ids parameter by mistake | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Dan Zheng <dzheng> |
| Component: | libvirt | Assignee: | Erik Skultety <eskultet> |
| Status: | CLOSED ERRATA | QA Contact: | Dan Zheng <dzheng> |
| Severity: | urgent | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 8.2 | CC: | berrange, chhu, dyuan, eskultet, jdenemar, jen, jsuchane, lcheng, lmen, weizhan, xuzhang |
| Target Milestone: | beta | Keywords: | Automation, Regression, TestBlocker |
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-5.9.0-4.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-05-05 09:50:55 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Dan Zheng
2019-11-15 10:00:24 UTC
This is a serious issue that affects OSCI testing. The basic ability to connect to libvirt fails. Raising priority and severity and setting ITR and blocker?. PoC posted by Erik at https://www.redhat.com/archives/libvir-list/2019-November/msg00791.html The fix was pushed upstream as
commit d6064e2759a24e0802f363e3a810dc5a7d7ebb15
Refs: v5.9.0-361-gd6064e2759
Author: Erik Skultety <eskultet>
AuthorDate: Mon Nov 18 12:04:16 2019 +0100
Commit: Erik Skultety <eskultet>
CommitDate: Thu Nov 21 18:16:35 2019 +0100
libvirt-<module>: Check caller-provided buffers to be NULL with size > 0
Pre-Glib era which used malloc allowed the size of the client-side
buffers to be declared as 0, because malloc documents that it can either
return 0 or a unique pointer on 0 size allocations.
With glib this doesn't work anymore, because glib documents that for
such allocation requests NULL is always returned which results in an
error in our public API checks server-side.
This patch complements the fix in the RPC layer by explicitly erroring
out on the following combination of args used by our legacy APIs (their
moder equivalents don't suffer from this):
function(caller-allocated-array, size, ...) {
if (!caller-allocated-array && size > 0)
return error;
}
treating everything else as a valid input and potentially let that fail
on the server-side rather than client-side.
https://bugzilla.redhat.com/show_bug.cgi?id=1772842
Signed-off-by: Erik Skultety <eskultet>
Reviewed-by: Daniel P. Berrangé <berrange>
Test packages: perl-Sys-Virt-5.8.0-1.module+el8.2.0+4793+b09dd2fb.x86_64 libvirt-5.9.0-4.module+el8.2.0+4836+a8e32ad7.x86_64 qemu-kvm-4.2.0-1.module+el8.2.0+4793+b09dd2fb.x86_64 kernel-4.18.0-151.el8.x86_64 perl-Sys-Virt acceptance automation job can run and get results. This bug originally blocked all the tests of perl-Sys-Virt job. So I verify this bug now. 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:2017 |