- 15 12月, 2013 1 次提交
-
-
由 Christophe Fergeau 提交于
The array of sasl_callback_t callbacks which is passed to sasl_client_new() must be kept alive as long as the created sasl_conn_t object is alive as cyrus-sasl uses this structure internally for things like logging, so the memory used for callbacks must only be freed after sasl_dispose() has been called. During testing of successful SASL logins with virsh -c qemu+tls:///system list --all I've been getting invalid read reports from valgrind ==9237== Invalid read of size 8 ==9237== at 0x6E93B6F: _sasl_getcallback (common.c:1745) ==9237== by 0x6E95430: _sasl_log (common.c:1850) ==9237== by 0x16593D87: digestmd5_client_mech_dispose (digestmd5.c:4580) ==9237== by 0x6E91653: client_dispose (client.c:332) ==9237== by 0x6E9476A: sasl_dispose (common.c:851) ==9237== by 0x4E225A1: virNetSASLSessionDispose (virnetsaslcontext.c:678) ==9237== by 0x4CBC551: virObjectUnref (virobject.c:262) ==9237== by 0x4E254D1: virNetSocketDispose (virnetsocket.c:1042) ==9237== by 0x4CBC551: virObjectUnref (virobject.c:262) ==9237== by 0x4E2701C: virNetSocketEventFree (virnetsocket.c:1794) ==9237== by 0x4C965D3: virEventPollCleanupHandles (vireventpoll.c:583) ==9237== by 0x4C96987: virEventPollRunOnce (vireventpoll.c:652) ==9237== by 0x4C94730: virEventRunDefaultImpl (virevent.c:274) ==9237== by 0x12C7BA: vshEventLoop (virsh.c:2407) ==9237== by 0x4CD3D04: virThreadHelper (virthreadpthread.c:161) ==9237== by 0x7DAEF32: start_thread (pthread_create.c:309) ==9237== by 0x8C86EAC: clone (clone.S:111) ==9237== Address 0xe2d61b0 is 0 bytes inside a block of size 168 free'd ==9237== at 0x4A07577: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==9237== by 0x4C73827: virFree (viralloc.c:580) ==9237== by 0x4DE4BC7: remoteAuthSASL (remote_driver.c:4219) ==9237== by 0x4DE33D0: remoteAuthenticate (remote_driver.c:3639) ==9237== by 0x4DDBFAA: doRemoteOpen (remote_driver.c:832) ==9237== by 0x4DDC8DC: remoteConnectOpen (remote_driver.c:1031) ==9237== by 0x4D8595F: do_open (libvirt.c:1239) ==9237== by 0x4D863F3: virConnectOpenAuth (libvirt.c:1481) ==9237== by 0x12762B: vshReconnect (virsh.c:337) ==9237== by 0x12C9B0: vshInit (virsh.c:2470) ==9237== by 0x12E9A5: main (virsh.c:3338) This commit changes virNetSASLSessionNewClient() to take ownership of the SASL callbacks. Then we can free them in virNetSASLSessionDispose() after the corresponding sasl_conn_t has been freed. (cherry picked from commit 13fdc6d6)
-
- 30 10月, 2013 4 次提交
-
-
由 Daniel P. Berrange 提交于
Most of the usage of getuid()/getgid() is in cases where we are considering what privileges we have. As such the code should be using the effective IDs, not real IDs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 9b0af092)
-
由 Daniel P. Berrange 提交于
We don't want setuid programs automatically spawning libvirtd, so disable any use of autostart when setuid. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 171bb129)
-
由 Daniel P. Berrange 提交于
We don't know enough about quality of external libraries used for non-UNIX transports, nor do we want to spawn external commands when setuid. Restrict to the bare minimum which is UNIX transport for local usage. Users shouldn't need to be running setuid if connecting to remote hypervisors in any case. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit e22b0232)
-
由 Daniel P. Berrange 提交于
Unconditional use of getenv is not secure in setuid env. While not all libvirt code runs in a setuid env (since much of it only exists inside libvirtd) this is not always clear to developers. So make all the code paranoid, even if it only ever runs inside libvirtd. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 1e4a02bd)
-
- 23 10月, 2013 1 次提交
-
-
由 Zhou Yimin 提交于
Introduced by 7b87a3 When I quit the process which only register VIR_DOMAIN_EVENT_ID_REBOOT, I got error like: "libvirt: XML-RPC error : internal error: domain event 0 not registered". Then I add the following code, it fixed. Signed-off-by: NZhou Yimin <zhouyimin@huawei.com> Signed-off-by: NEric Blake <eblake@redhat.com> (cherry picked from commit 9712c251)
-
- 24 9月, 2013 1 次提交
-
-
由 Giuseppe Scrivano 提交于
Signed-off-by: NGiuseppe Scrivano <gscrivan@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 29 8月, 2013 11 次提交
-
-
由 Daniel P. Berrange 提交于
The return values for the virConnectListAllSecrets call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The return values for the virConnectListAllNWFilters call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The return values for the virConnectListAllNodeDevices call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The return values for the virConnectListAllInterfaces call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The return values for the virConnectListAllNetworks call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The return values for the virStoragePoolListAllVolumes call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The return values for the virConnectListAllStoragePools call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The return values for the virConnectListAllDomains call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The return values for the virDomain{SnapshotListAllChildren,ListAllSnapshots} calls were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The return values for the virDomainGetJobStats call were not bounds checked. This is a robustness issue for clients if something where to cause corruption of the RPC stream data. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The parameters for the virDomainMigrate*Params RPC calls were not bounds checks, meaning a malicious client can cause libvirtd to consume arbitrary memory This issue was introduced in the 1.1.0 release of libvirt Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 09 8月, 2013 1 次提交
-
-
由 Alex Jia 提交于
Valgrind defects memory error: ==16759== 1 errors in context 1 of 8: ==16759== Invalid free() / delete / delete[] / realloc() ==16759== at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==16759== by 0x83CD329: xdr_string (in /usr/lib64/libc-2.17.so) ==16759== by 0x4D93E4D: xdr_remote_nonnull_string (remote_protocol.c:31) ==16759== by 0x4D94350: xdr_remote_nonnull_domain (remote_protocol.c:58) ==16759== by 0x4D976C8: xdr_remote_domain_create_with_flags_ret (remote_protocol.c:1762) ==16759== by 0x83CC734: xdr_free (in /usr/lib64/libc-2.17.so) ==16759== by 0x4D7F1E0: remoteDomainCreateWithFlags (remote_driver.c:2441) ==16759== by 0x4D4BF17: virDomainCreateWithFlags (libvirt.c:9499) ==16759== by 0x13127A: cmdStart (virsh-domain.c:3376) ==16759== by 0x12BF83: vshCommandRun (virsh.c:1751) ==16759== by 0x126FFB: main (virsh.c:3205) ==16759== Address 0xe1394a0 is not stack'd, malloc'd or (recently) free'd ==16759== 1 errors in context 2 of 8: ==16759== Conditional jump or move depends on uninitialised value(s) ==16759== at 0x4A07477: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==16759== by 0x83CD329: xdr_string (in /usr/lib64/libc-2.17.so) ==16759== by 0x4D93E4D: xdr_remote_nonnull_string (remote_protocol.c:31) ==16759== by 0x4D94350: xdr_remote_nonnull_domain (remote_protocol.c:58) ==16759== by 0x4D976C8: xdr_remote_domain_create_with_flags_ret (remote_protocol.c:1762) ==16759== by 0x83CC734: xdr_free (in /usr/lib64/libc-2.17.so) ==16759== by 0x4D7F1E0: remoteDomainCreateWithFlags (remote_driver.c:2441) ==16759== by 0x4D4BF17: virDomainCreateWithFlags (libvirt.c:9499) ==16759== by 0x13127A: cmdStart (virsh-domain.c:3376) ==16759== by 0x12BF83: vshCommandRun (virsh.c:1751) ==16759== by 0x126FFB: main (virsh.c:3205) ==16759== Uninitialised value was created by a stack allocation ==16759== at 0x4D7F120: remoteDomainCreateWithFlags (remote_driver.c:2423) How to reproduce? # virsh start <domain> --paused RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=994855Signed-off-by: NAlex Jia <ajia@redhat.com>
-
- 18 7月, 2013 3 次提交
-
-
由 Jiri Denemark 提交于
-
由 Daniel P. Berrange 提交于
In the following commit: commit 03d813bb Author: Marek Marczykowski <marmarek@invisiblethingslab.com> Date: Thu May 23 02:01:30 2013 +0200 remote: fix dom->id after virDomainCreateWithFlags The virDomainCreateWithFlags remote client helper was made to invoke REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID to refresh the 'id' of the domain, following the pattern used in the previous virDomainCreate method impl. The remote protocol for virDomainCreateWithFlags though did actually fix the design flaw in virDomainCreate, by directly returning the new domain info. For some reason, this data was never used. So we can just use that data now instead. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Since they make use of file descriptor passing, the remote protocol methods for virDomainCreate{XML}WithFiles must be written by hand. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 16 7月, 2013 1 次提交
-
-
由 John Ferlan 提交于
Wire up the remote protocol
-
- 12 7月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
This patch enables the password authentication in the libssh2 connection driver. There are a few benefits to this step: 1) Hosts with challenge response authentication will now be supported with the libssh2 connection driver. 2) Credential for hosts can now be stored in the authentication credential config file
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 7月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 02 7月, 2013 1 次提交
-
-
由 Eric Blake 提交于
Found while trying to cross-compile to mingw: CC libvirt_driver_remote_la-remote_driver.lo ../../src/remote/remote_driver.c: In function 'doRemoteOpen': ../../src/remote/remote_driver.c:487:23: error: variable 'verify' set but not used [-Werror=unused-but-set-variable] * src/remote/remote_driver.c (doRemoteOpen): Also ignore 'verify'. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 25 6月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 14 6月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
The parsed path in the URI may be NULL resulting into: $ virsh -c qemu+ssh:// list Segmentation fault (core dumped) Introduced by 22d81ceb
-
由 Peter Krempa 提交于
Without the socket path explicitly specified, the remote driver tried to connect to the "/system" instance socket even if "/session" was specified in the uri. With this patch this configuration now produces an error. It is still possible to initiate a session connection with specifying the path to the socket manually and also manually starting the session daemon. This was also possible prior to this patch, This is a minimal fix. We may decide to support remote session connections using ssh but this will require changes to the remote driver code so this fix shouldn't cause regressions in the case we decide to do that.
-
- 06 6月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
Found with 'git grep "= 1"'.
-
- 23 5月, 2013 2 次提交
-
-
由 Marek Marczykowski 提交于
The same issue as (already fixed) in virDomainCreate - REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS doesn't return new domain ID, only -1 on error or 0 on success. Besides this one fix it is more general problem - local domain object ID can desynchronize with the real one, for example in case of another client creates/destroys domain in the meantime. Perhaps virDomainGetID should be called remotely (with all performance implications...)? Or some event-based notification used? Signed-off-by: NMarek Marczykowski <marmarek@invisiblethingslab.com>
-
由 Michal Privoznik 提交于
-
- 21 5月, 2013 1 次提交
-
-
由 Osier Yang 提交于
-
- 02 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
The source code base needs to be adapted as well. Some files include virutil.h just for the string related functions (here, the include is substituted to match the new file), some include virutil.h without any need (here, the include is removed), and some require both.
-
- 26 4月, 2013 1 次提交
-
-
由 Laine Stump 提交于
This requires a custom function for remoteNodeDeviceDetachFlags, because it is named *NodeDevice, but it goes through the hypervisor driver rather than nodedevice driver, and so it uses privateData instead of nodeDevicePrivateData. (It has to go through the hypervisor driver, because that is the driver that knows about the backend drivers that will perform the pci device assignment).
-
- 24 4月, 2013 4 次提交
-
-
由 Daniel P. Berrange 提交于
Ensure that all drivers implementing public APIs use a naming convention for their implementation that matches the public API name. eg for the public API virDomainCreate make sure QEMU uses qemuDomainCreate and not qemuDomainStart Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
It will simplify later work if the sub-drivers have dedicated APIs / field names. ie virNetworkDriver should have virDrvNetworkOpen and virDrvNetworkClose methods Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The driver.h struct for node devices used an inconsistent naming scheme 'DeviceMonitor' instead of the more usual 'NodeDeviceDriver'. Fix this everywhere it has leaked out to. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Ensure that the driver struct field names match the public API names. For an API virXXXX we must have a driver struct field xXXXX. ie strip the leading 'vir' and lowercase any leading uppercase letters. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-