Don't crash if a connection closes early
https://bugzilla.redhat.com/show_bug.cgi?id=1047577 When a client closes its connection to libvirtd early during virConnectOpen, more specifically just after making REMOTE_PROC_CONNECT_SUPPORTS_FEATURE call to check if VIR_DRV_FEATURE_PROGRAM_KEEPALIVE is supported without even waiting for the result, libvirtd may crash due to a race in keep-alive initialization. Once receiving the REMOTE_PROC_CONNECT_SUPPORTS_FEATURE call, the daemon's event loop delegates it to a worker thread. In case the event loop detects EOF on the connection and calls virNetServerClientClose before the worker thread starts to handle REMOTE_PROC_CONNECT_SUPPORTS_FEATURE call, client->keepalive will be disposed by the time virNetServerClientStartKeepAlive gets called from remoteDispatchConnectSupportsFeature. Because the flow is common for both authenticated and read-only connections, even unprivileged clients may cause the daemon to crash. To avoid the crash, virNetServerClientStartKeepAlive needs to check if the connection is still open before starting keep-alive protocol. Every libvirt release since 0.9.8 is affected by this bug.
Showing
-
mentioned in commit 41a540c7
-
mentioned in commit 35ed9796
-
mentioned in commit ffdb6409
-
mentioned in commit c385db59
-
mentioned in commit e3ca9d3d
-
mentioned in commit 7fad864a
-
mentioned in commit b24979a1
-
mentioned in commit 21fb70f0
-
mentioned in commit 9b1e0508
-
mentioned in commit 4888b0b3
-
mentioned in commit 99f8d97a
-
mentioned in commit c4d275c9
-
mentioned in commit 5055fe4b
-
mentioned in commit a592f3d3
-
mentioned in commit 700b39d0
-
mentioned in commit c86813d5
-
mentioned in commit 08672cff
-
mentioned in commit ac4be802
-
mentioned in commit 2842b103
-
mentioned in commit ed327dfc
-
mentioned in commit 8342adef
-
mentioned in commit d2740153
-
mentioned in commit eb365315
-
mentioned in commit b06acd14
-
mentioned in commit a19f700b
想要评论请 注册 或 登录