libvirt/src/libvirt_remote.syms

281 lines
7.0 KiB
Plaintext
Raw Normal View History

#
# Private symbols used in RPC operations. Add symbols here, and see
# Makefile.am for more details.
#
# Keep this file sorted by header name, then by symbols with each header.
#
# Generated files
xdr_*;
# Hack only required for Win32 to make tests link properly,
# as the wildcard above doesn't work there. Fortunately
# Win32 builds don't require the other xdr_* syms exported.
# since there's no libvirtd built.
xdr_virNetMessageError;
# rpc/virnetclient.h
virNetClientAddProgram;
virNetClientAddStream;
virNetClientClose;
virNetClientDupFD;
virNetClientGetFD;
virNetClientGetTLSKeySize;
virNetClientHasPassFD;
virNetClientIsEncrypted;
virNetClientIsOpen;
virNetClientKeepAliveIsSupported;
virNetClientKeepAliveStart;
virNetClientKeepAliveStop;
virNetClientLocalAddrStringSASL;
virNetClientNewExternal;
virNetClientNewLibSSH2;
virNetClientNewSSH;
virNetClientNewTCP;
virNetClientNewUNIX;
virNetClientRegisterAsyncIO;
virNetClientRegisterKeepAlive;
virNetClientRemoteAddrStringSASL;
virNetClientRemoveStream;
virNetClientSendNonBlock;
virNetClientSendStream;
virNetClientSendWithReply;
virNetClientSetCloseCallback;
virNetClientSetTLSSession;
# rpc/virnetclientprogram.h
virNetClientProgramCall;
virNetClientProgramDispatch;
virNetClientProgramGetProgram;
virNetClientProgramGetVersion;
virNetClientProgramMatches;
virNetClientProgramNew;
# rpc/virnetclientstream.h
virNetClientStreamCheckSendStatus;
virNetClientStreamCheckState;
virNetClientStreamEOF;
virNetClientStreamEventAddCallback;
virNetClientStreamEventRemoveCallback;
virNetClientStreamEventUpdateCallback;
virNetClientStreamMatches;
virNetClientStreamNew;
virNetClientStreamQueuePacket;
virNetClientStreamRecvHole;
virNetClientStreamRecvPacket;
virNetClientStreamSendHole;
virNetClientStreamSendPacket;
virNetClientStreamSetError;
# rpc/virnetdaemon.h
virNetDaemonAddServer;
virNetDaemonAddShutdownInhibition;
virNetDaemonAddSignalHandler;
virNetDaemonAutoShutdown;
virNetDaemonClose;
virNetDaemonGetServer;
virNetDaemonGetServers;
virNetDaemonHasClients;
virNetDaemonHasServer;
virNetDaemonIsPrivileged;
virNetDaemonNew;
virNetDaemonNewPostExecRestart;
virNetDaemonPreExecRestart;
virNetDaemonQuit;
virNetDaemonRemoveShutdownInhibition;
virNetDaemonRun;
virNetDaemonUpdateServices;
# rpc/virnetmessage.h
virNetMessageAddFD;
virNetMessageClear;
virNetMessageClearPayload;
virNetMessageDecodeHeader;
virNetMessageDecodeLength;
virNetMessageDecodeNumFDs;
virNetMessageDecodePayload;
virNetMessageDupFD;
virNetMessageEncodeHeader;
virNetMessageEncodeNumFDs;
virNetMessageEncodePayload;
virNetMessageEncodePayloadRaw;
virNetMessageFree;
virNetMessageNew;
virNetMessageQueuePush;
virNetMessageQueueServe;
virNetMessageSaveError;
# rpc/virnetserver.h
virNetServerAddClient;
virNetServerAddProgram;
virNetServerAddService;
virNetServerAddServiceTCP;
virNetServerAddServiceUNIX;
virNetServerClose;
virNetServerGetClient;
virNetServerGetClients;
virNetServerGetCurrentClients;
virNetServerGetCurrentUnauthClients;
virNetServerGetMaxClients;
virNetServerGetMaxUnauthClients;
virNetServerGetName;
virNetServerGetThreadPoolParameters;
virNetServerHasClients;
virNetServerNeedsAuth;
virNetServerNew;
virNetServerNewPostExecRestart;
virNetServerNextClientID;
virNetServerPreExecRestart;
virNetServerProcessClients;
virNetServerSetClientAuthenticated;
virNetServerSetClientLimits;
virNetServerSetThreadPoolParameters;
virNetServerSetTLSContext;
virNetServerUpdateServices;
virNetServerUpdateTlsFiles;
# rpc/virnetserverclient.h
virNetServerClientAddFilter;
virNetServerClientClose;
virNetServerClientCloseLocked;
virNetServerClientDelayedClose;
virNetServerClientGetAuth;
virNetServerClientGetFD;
virNetServerClientGetID;
virNetServerClientGetIdentity;
virNetServerClientGetInfo;
virNetServerClientGetPrivateData;
virNetServerClientGetReadonly;
virNetServerClientGetSELinuxContext;
virNetServerClientGetTimestamp;
virNetServerClientGetTLSKeySize;
virNetServerClientGetTLSSession;
virNetServerClientGetTransport;
virNetServerClientGetUNIXIdentity;
virNetServerClientHasTLSSession;
virNetServerClientImmediateClose;
virNetServerClientInit;
virNetServerClientInitKeepAlive;
virNetServerClientIsAuthenticated;
rpc: virnetserver: Fix race on srv->nclients_unauth There is a race between virNetServerProcessClients (main thread) and remoteDispatchAuthList/remoteDispatchAuthPolkit/remoteSASLFinish (worker thread) that can lead to decrementing srv->nclients_unauth when it's zero. Since virNetServerCheckLimits relies on the value srv->nclients_unauth the underrun causes libvirtd to stop accepting new connections forever. Example race scenario (assuming libvirtd is using policykit and the client is privileged): 1. The client calls the RPC remoteDispatchAuthList => remoteDispatchAuthList is executed on a worker thread (Thread T1). We're assuming now the execution stops for some time before the line 'virNetServerClientSetAuth(client, 0)' 2. The client closes the connection irregularly. This causes the event loop to wake up and virNetServerProcessClient to be called (on the main thread T0). During the virNetServerProcessClients the srv lock is hold. The condition virNetServerClientNeedAuth(client) will be checked and as the authentication is not finished right now virNetServerTrackCompletedAuthLocked(srv) will be called => --srv->nclients_unauth => 0 3. The Thread T1 continues, marks the client as authenticated, and calls virNetServerTrackCompletedAuthLocked(srv) => --srv->nclients_unauth => --0 => wrap around as nclient_unauth is unsigned 4. virNetServerCheckLimits(srv) will disable the services forever To fix it, add an auth_pending field to the client struct so that it is now possible to determine if the authentication process has already been handled for this client. Setting the authentication method to none for the client in virNetServerProcessClients is not a proper way to indicate that the counter has been decremented, as this would imply that the client is authenticated. Additionally, adjust the existing test cases for this new field. Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
2017-12-21 14:29:05 +00:00
virNetServerClientIsAuthPendingLocked;
virNetServerClientIsClosedLocked;
virNetServerClientIsLocal;
virNetServerClientIsSecure;
virNetServerClientLocalAddrStringSASL;
virNetServerClientNew;
virNetServerClientNewPostExecRestart;
virNetServerClientPreExecRestart;
virNetServerClientRemoteAddrStringSASL;
virNetServerClientRemoteAddrStringURI;
virNetServerClientRemoveFilter;
virNetServerClientSendMessage;
virNetServerClientSetAuthLocked;
rpc: virnetserver: Fix race on srv->nclients_unauth There is a race between virNetServerProcessClients (main thread) and remoteDispatchAuthList/remoteDispatchAuthPolkit/remoteSASLFinish (worker thread) that can lead to decrementing srv->nclients_unauth when it's zero. Since virNetServerCheckLimits relies on the value srv->nclients_unauth the underrun causes libvirtd to stop accepting new connections forever. Example race scenario (assuming libvirtd is using policykit and the client is privileged): 1. The client calls the RPC remoteDispatchAuthList => remoteDispatchAuthList is executed on a worker thread (Thread T1). We're assuming now the execution stops for some time before the line 'virNetServerClientSetAuth(client, 0)' 2. The client closes the connection irregularly. This causes the event loop to wake up and virNetServerProcessClient to be called (on the main thread T0). During the virNetServerProcessClients the srv lock is hold. The condition virNetServerClientNeedAuth(client) will be checked and as the authentication is not finished right now virNetServerTrackCompletedAuthLocked(srv) will be called => --srv->nclients_unauth => 0 3. The Thread T1 continues, marks the client as authenticated, and calls virNetServerTrackCompletedAuthLocked(srv) => --srv->nclients_unauth => --0 => wrap around as nclient_unauth is unsigned 4. virNetServerCheckLimits(srv) will disable the services forever To fix it, add an auth_pending field to the client struct so that it is now possible to determine if the authentication process has already been handled for this client. Setting the authentication method to none for the client in virNetServerProcessClients is not a proper way to indicate that the counter has been decremented, as this would imply that the client is authenticated. Additionally, adjust the existing test cases for this new field. Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
2017-12-21 14:29:05 +00:00
virNetServerClientSetAuthPendingLocked;
virNetServerClientSetCloseHook;
virNetServerClientSetDispatcher;
virNetServerClientSetIdentity;
virNetServerClientSetQuietEOF;
virNetServerClientSetReadonly;
virNetServerClientStartKeepAlive;
virNetServerClientWantCloseLocked;
# rpc/virnetserverprogram.h
virNetServerProgramDispatch;
virNetServerProgramGetID;
virNetServerProgramGetPriority;
virNetServerProgramGetVersion;
virNetServerProgramMatches;
virNetServerProgramNew;
virNetServerProgramSendReplyError;
virNetServerProgramSendStreamData;
virNetServerProgramSendStreamError;
virNetServerProgramSendStreamHole;
virNetServerProgramUnknownError;
# rpc/virnetserverservice.h
virNetServerServiceClose;
virNetServerServiceGetAuth;
virNetServerServiceGetMaxRequests;
virNetServerServiceGetPort;
virNetServerServiceGetTLSContext;
virNetServerServiceIsReadonly;
virNetServerServiceNewFDs;
virNetServerServiceNewPostExecRestart;
virNetServerServiceNewTCP;
virNetServerServiceNewUNIX;
virNetServerServicePreExecRestart;
virNetServerServiceSetDispatcher;
virNetServerServiceToggle;
# rpc/virnetsocket.h
virNetSocketAccept;
virNetSocketAddIOCallback;
virNetSocketCheckProtocols;
virNetSocketClose;
virNetSocketDupFD;
virNetSocketGetFD;
virNetSocketGetPath;
virNetSocketGetPort;
virNetSocketGetSELinuxContext;
virNetSocketGetUNIXIdentity;
virNetSocketHasCachedData;
virNetSocketHasPassFD;
virNetSocketHasPendingData;
virNetSocketIsLocal;
virNetSocketListen;
virNetSocketLocalAddrStringSASL;
virNetSocketNewConnectCommand;
virNetSocketNewConnectExternal;
virNetSocketNewConnectLibSSH2;
virNetSocketNewConnectSockFD;
virNetSocketNewConnectSSH;
virNetSocketNewConnectTCP;
virNetSocketNewConnectUNIX;
virNetSocketNewListenFD;
virNetSocketNewListenTCP;
virNetSocketNewListenUNIX;
virNetSocketNewPostExecRestart;
virNetSocketPreExecRestart;
virNetSocketRead;
virNetSocketRecvFD;
virNetSocketRemoteAddrStringSASL;
virNetSocketRemoteAddrStringURI;
virNetSocketRemoveIOCallback;
virNetSocketSendFD;
virNetSocketSetBlocking;
virNetSocketSetTLSSession;
virNetSocketUpdateIOCallback;
virNetSocketWrite;
# rpc/virnettlscontext.h
virNetTLSContextCheckCertificate;
virNetTLSContextNewClient;
virNetTLSContextNewClientPath;
virNetTLSContextNewServer;
virNetTLSContextNewServerPath;
virNetTLSInit;
virNetTLSSessionGetHandshakeStatus;
virNetTLSSessionGetKeySize;
virNetTLSSessionGetX509DName;
virNetTLSSessionHandshake;
virNetTLSSessionNew;
virNetTLSSessionRead;
virNetTLSSessionSetIOCallbacks;
virNetTLSSessionWrite;
# Let emacs know we want case-insensitive sorting
# Local Variables:
# sort-fold-case: t
# End: